bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56695: A new and old font problem with Arabic


From: Eli Zaretskii
Subject: bug#56695: A new and old font problem with Arabic
Date: Fri, 22 Jul 2022 17:18:46 +0300

[Please use Reply All to keep the bug tracker CC'ed.]

> Date: Fri, 22 Jul 2022 15:41:05 +0200 (CEST)
> From: "fr_ml@t-online.de" <fr_ml@t-online.de>
> 
> > 1. I can't change the Arabic characters to the font of DejaVu Sans
> > > Mono (or others). This wasn't a problem before.
> > 
> > What do you mean by "cannot change"?  What happens if you try?  Please
> > show the exact sequence of commands or Lisp code you used, and any
> > error messages or incorrect effects you see when you do that.
> I use the mouse with left click to chose  'Change Buffer Font'.
> I don't get any error message. Just: "Buffer-Face mode enabled".
> The Latin letters get their new font, but the Arabic ones don't.

This is not a bug: if the font you choose cannot support Arabic, Emacs
will fall back to the setup in the current fontset.  In general,
selecting a font only affects ASCII characters; it affects non-ASCII
characters only if the font can display them properly.

> > > Can Harfbuzz be a problem? In the older emacs version (maybe 3 or 4 years 
> > > ago?) I never had these
> > > problems.
> > 
> > I don't know, because critical information is missing:
> > 
> >   . on what OS is that?
> Linux. I've tried Ubuntu and Arch.
> >   . what is the version of HarfBuzz you have installed?
> harfbuzz 4.4.1-1 
> >   . what is the text that is not displayed correctly? (please provide
> >     it as plain text that can be copied and examined, not as an image)
> Sorry. I forgot:
> (
> a-b-c-d
> 1234567
> س-س-س-س
> 1234567
> )

I don't think HarfBuzz is a problem in your case, but the font
probably is.

> >   . what does Emacs say when you go to the characters involved in this
> >     display and type "C-u C-x ="?
> Before changing the font:
> 
> position: 23 of 32 (69%), column: 6
> character: س‎ (displayed as س‎) (codepoint 1587, #o3063, #x633)
> charset: unicode (Unicode (ISO10646))
> code point in charset: 0x0633
> script: arabic
> syntax: w     which means: word
> category: .:Base, R:Strong R2L, b:Arabic
> to input: type "C-x 8 RET 633" or "C-x 8 RET ARABIC LETTER SEEN"
> buffer code: #xD8 #xB3
> file code: #xD8 #xB3 (encoded by coding system utf-8-unix)
> display: by this font (glyph code):
> ftcrhb:-1ASC-Droid Serif-normal-normal-normal-*-13-*-*-*-*-0-iso10646-1 (#x0E)

So Emacs uses the Droid Serif font for Arabic, and I guess that's the
problem.

> 
> Character code properties: customize what to show
>   name: ARABIC LETTER SEEN
>   general-category: Lo (Letter, Other)
>   decomposition: (1587) ('س')
> ----
> After changing, or trying to change it:I get exactly the same output.
> 
> > 
> > In general DejaVu Sans is known as a problematic font for complex text
> > shaping (which is required for Arabic), so my advice is to use some
> > other font as the default.
> DejaVu Sans Mono was always ok. And often I need a monospaced font - do you 
> know another one for Arabic?

Try the Amiri font, I'm told it is OK.  But you need to set that up in
the fontset; do not use Amiri as your default font.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]