* Cairo font selection for Ethiopic @ 2019-06-20 19:30 Stephen Berman 2019-06-21 1:54 ` YAMAMOTO Mitsuharu 0 siblings, 1 reply; 9+ messages in thread From: Stephen Berman @ 2019-06-20 19:30 UTC (permalink / raw) To: emacs-devel I don't know if this is a bug or just the way Cairo works. On two different GNU/Linux systems I have built Emacs both --with-cairo and without. The non-Cairo builds use Xft as the font backend. On those builds the Ethiopic scripts (Amharic and Tigrinya) in HELLO are displayed with the Goha-Tibeb Zemen font. In the Cairo builds this font is not used for these scripts; instead, on one system they are displayed with a mix of GNU Unifont and mutt-clearlyu, and on the other system, which lacks these fonts, only hex boxes are displayed. Is there something about Goha-Tibeb Zemen that is incompatible with Cairo? Steve Berman ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-20 19:30 Cairo font selection for Ethiopic Stephen Berman @ 2019-06-21 1:54 ` YAMAMOTO Mitsuharu 2019-06-21 8:05 ` Stephen Berman 0 siblings, 1 reply; 9+ messages in thread From: YAMAMOTO Mitsuharu @ 2019-06-21 1:54 UTC (permalink / raw) To: Stephen Berman; +Cc: emacs-devel On Fri, 21 Jun 2019 04:30:09 +0900, Stephen Berman wrote: > > I don't know if this is a bug or just the way Cairo works. On two > different GNU/Linux systems I have built Emacs both --with-cairo and > without. The non-Cairo builds use Xft as the font backend. On those > builds the Ethiopic scripts (Amharic and Tigrinya) in HELLO are > displayed with the Goha-Tibeb Zemen font. In the Cairo builds this font > is not used for these scripts; instead, on one system they are displayed > with a mix of GNU Unifont and mutt-clearlyu, and on the other system, > which lacks these fonts, only hex boxes are displayed. Is there > something about Goha-Tibeb Zemen that is incompatible with Cairo? Goha-Tibeb Zemen does not have glyphs for ASCII printables that the ftcr font backend relies on computing minimum/average/space width when opening the font. The patch below should simulate the Xft behavior. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp diff --git a/src/ftcrfont.c b/src/ftcrfont.c index a019fe8294a..0cc40b4c944 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -187,7 +187,6 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int pixel_size) block_input (); cairo_glyph_t stack_glyph; - int n = 0; font->min_width = font->average_width = font->space_width = 0; for (char c = 32; c < 127; c++) { @@ -198,28 +197,25 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int pixel_size) 0, 0, &c, 1, &glyphs, &num_glyphs, NULL, NULL, NULL); - if (status == CAIRO_STATUS_SUCCESS) + /* In order to simulate the Xft behavior, we use metrics of + glyph ID 0 if there is no glyph for an ASCII printable. */ + if (status != CAIRO_STATUS_SUCCESS) + stack_glyph.index = 0; + else if (glyphs != &stack_glyph) { - if (glyphs != &stack_glyph) - cairo_glyph_free (glyphs); - else if (stack_glyph.index) - { - int this_width = ftcrfont_glyph_extents (font, stack_glyph.index, - NULL); - - if (this_width > 0 - && (! font->min_width - || font->min_width > this_width)) - font->min_width = this_width; - if (c == 32) - font->space_width = this_width; - font->average_width += this_width; - n++; - } + cairo_glyph_free (glyphs); + stack_glyph.index = 0; } + int this_width = ftcrfont_glyph_extents (font, stack_glyph.index, NULL); + if (this_width > 0 + && (! font->min_width + || font->min_width > this_width)) + font->min_width = this_width; + if (c == 32) + font->space_width = this_width; + font->average_width += this_width; } - if (n > 0) - font->average_width /= n; + font->average_width /= 95; cairo_scaled_font_extents (ftcrfont_info->cr_scaled_font, &extents); font->ascent = lround (extents.ascent); ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-21 1:54 ` YAMAMOTO Mitsuharu @ 2019-06-21 8:05 ` Stephen Berman 2019-06-21 10:52 ` mituharu 0 siblings, 1 reply; 9+ messages in thread From: Stephen Berman @ 2019-06-21 8:05 UTC (permalink / raw) To: YAMAMOTO Mitsuharu; +Cc: emacs-devel On Fri, 21 Jun 2019 10:54:03 +0900 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> wrote: > On Fri, 21 Jun 2019 04:30:09 +0900, > Stephen Berman wrote: >> >> I don't know if this is a bug or just the way Cairo works. On two >> different GNU/Linux systems I have built Emacs both --with-cairo and >> without. The non-Cairo builds use Xft as the font backend. On those >> builds the Ethiopic scripts (Amharic and Tigrinya) in HELLO are >> displayed with the Goha-Tibeb Zemen font. In the Cairo builds this font >> is not used for these scripts; instead, on one system they are displayed >> with a mix of GNU Unifont and mutt-clearlyu, and on the other system, >> which lacks these fonts, only hex boxes are displayed. Is there >> something about Goha-Tibeb Zemen that is incompatible with Cairo? > > Goha-Tibeb Zemen does not have glyphs for ASCII printables that the > ftcr font backend relies on computing minimum/average/space width when > opening the font. The patch below should simulate the Xft behavior. Thanks. I rebuilt Emacs --with-cairo with this patch but the Ethiopic scripts in HELLO are still not displayed with Goha-Tibeb Zemen but also not with the same fonts as before: now they are uniformly displayed with -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-*-*-c-120-iso10646-1 Is this the intended result of the patch? Steve Berman ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-21 8:05 ` Stephen Berman @ 2019-06-21 10:52 ` mituharu 2019-06-21 11:28 ` Stephen Berman 0 siblings, 1 reply; 9+ messages in thread From: mituharu @ 2019-06-21 10:52 UTC (permalink / raw) To: Stephen Berman; +Cc: emacs-devel > On Fri, 21 Jun 2019 10:54:03 +0900 YAMAMOTO Mitsuharu > <mituharu@math.s.chiba-u.ac.jp> wrote: > >> On Fri, 21 Jun 2019 04:30:09 +0900, >> Stephen Berman wrote: >>> >>> I don't know if this is a bug or just the way Cairo works. On two >>> different GNU/Linux systems I have built Emacs both --with-cairo and >>> without. The non-Cairo builds use Xft as the font backend. On those >>> builds the Ethiopic scripts (Amharic and Tigrinya) in HELLO are >>> displayed with the Goha-Tibeb Zemen font. In the Cairo builds this >>> font >>> is not used for these scripts; instead, on one system they are >>> displayed >>> with a mix of GNU Unifont and mutt-clearlyu, and on the other system, >>> which lacks these fonts, only hex boxes are displayed. Is there >>> something about Goha-Tibeb Zemen that is incompatible with Cairo? >> >> Goha-Tibeb Zemen does not have glyphs for ASCII printables that the >> ftcr font backend relies on computing minimum/average/space width when >> opening the font. The patch below should simulate the Xft behavior. > > Thanks. I rebuilt Emacs --with-cairo with this patch but the Ethiopic > scripts in HELLO are still not displayed with Goha-Tibeb Zemen but also > not with the same fonts as before: now they are uniformly displayed with > > -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-*-*-c-120-iso10646-1 > > Is this the intended result of the patch? The patch enables us to use the Goha-Tibeb Zemen font on cairo build. If you manually specify the font for Ethiopic characters, then they should be displayed with the font. (let ((script 'ethiopic) (coverage)) (map-char-table #'(lambda (range val) (when (eq val script) (if (consp range) (setq range (cons (car range) (cdr range)))) (push range coverage))) char-script-table) (dolist (range coverage) (set-fontset-font t range (font-spec :family "Goha-Tibeb Zemen")))) Whether it is selected automatically in the default setting is another problem and depends on several factors. What are the outputs of the ldd command for both non-cairo and cairo builds? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-21 10:52 ` mituharu @ 2019-06-21 11:28 ` Stephen Berman 2019-06-22 3:08 ` YAMAMOTO Mitsuharu 0 siblings, 1 reply; 9+ messages in thread From: Stephen Berman @ 2019-06-21 11:28 UTC (permalink / raw) To: mituharu; +Cc: emacs-devel On Fri, 21 Jun 2019 19:52:36 +0900 mituharu@math.s.chiba-u.ac.jp wrote: >> On Fri, 21 Jun 2019 10:54:03 +0900 YAMAMOTO Mitsuharu >> <mituharu@math.s.chiba-u.ac.jp> wrote: >> >>> On Fri, 21 Jun 2019 04:30:09 +0900, >>> Stephen Berman wrote: >>>> >>> Goha-Tibeb Zemen does not have glyphs for ASCII printables that the >>> ftcr font backend relies on computing minimum/average/space width when >>> opening the font. The patch below should simulate the Xft behavior. >> >> Thanks. I rebuilt Emacs --with-cairo with this patch but the Ethiopic >> scripts in HELLO are still not displayed with Goha-Tibeb Zemen but also >> not with the same fonts as before: now they are uniformly displayed with >> >> -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-*-*-c-120-iso10646-1 >> >> Is this the intended result of the patch? > > The patch enables us to use the Goha-Tibeb Zemen font on cairo > build. If you manually specify the font for Ethiopic characters, > then they should be displayed with the font. > > (let ((script 'ethiopic) > (coverage)) > (map-char-table > #'(lambda (range val) > (when (eq val script) > (if (consp range) > (setq range (cons (car range) (cdr range)))) > (push range coverage))) > char-script-table) > (dolist (range coverage) > (set-fontset-font t range (font-spec :family "Goha-Tibeb Zemen")))) Yes, that works, thanks. > Whether it is selected automatically in the default setting is > another problem and depends on several factors. What are the > outputs of the ldd command for both non-cairo and cairo builds? Appended below; the only substantive difference (beside the addresses) is that only the non-cairo build includes this: libXft.so.2 => /usr/lib64/libXft.so.2 non-cairo build: linux-vdso.so.1 (0x00007ffe653ef000) libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007f6573a4a000) libjpeg.so.8 => /usr/lib64/libjpeg.so.8 (0x00007f65739b2000) libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f657396f000) libz.so.1 => /lib64/libz.so.1 (0x00007f6573955000) libgif.so.7 => /usr/lib64/libgif.so.7 (0x00007f657394a000) libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x00007f6573937000) libgtk-3.so.0 => /usr/lib64/libgtk-3.so.0 (0x00007f6573234000) libgdk-3.so.0 => /usr/lib64/libgdk-3.so.0 (0x00007f6573136000) libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007f6573126000) libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007f65730dc000) libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007f65730b3000) libcairo-gobject.so.2 => /usr/lib64/libcairo-gobject.so.2 (0x00007f65730a7000) libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007f6572f6d000) libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0 (0x00007f6572f45000) libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007f6572d75000) libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007f6572d19000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f6572bf5000) libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f6572bea000) libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f6572bca000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f6572a87000) libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f6572a82000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f6572a57000) libXft.so.2 => /usr/lib64/libXft.so.2 (0x00007f6572a3e000) libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f6572a31000) librsvg-2.so.2 => /usr/lib64/librsvg-2.so.2 (0x00007f65724bf000) libm.so.6 => /lib64/libm.so.6 (0x00007f657237a000) librt.so.1 => /lib64/librt.so.1 (0x00007f657236f000) libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007f657231b000) libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f657230e000) libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007f6572309000) libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f65722ff000) libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f65722ea000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f657217f000) libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f657214d000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f6572121000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f6572067000) libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f657201e000) libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f6571f21000) libotf.so.0 => /usr/lib64/libotf.so.0 (0x00007f6571f09000) libm17n-core.so.0 => /usr/lib64/libm17n-core.so.0 (0x00007f6571eda000) libm17n-flt.so.0 => /usr/lib64/libm17n-flt.so.0 (0x00007f6571ecd000) libgnutls.so.30 => /usr/lib64/libgnutls.so.30 (0x00007f6571d16000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6571cf3000) libanl.so.1 => /lib64/libanl.so.1 (0x00007f6571ced000) libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f6571c55000) libc.so.6 => /lib64/libc.so.6 (0x00007f6571a91000) liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f6571a5b000) libjbig.so.2 => /usr/lib64/libjbig.so.2 (0x00007f6571a4d000) libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007f6571a45000) libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f6571a32000) libatk-bridge-2.0.so.0 => /usr/lib64/libatk-bridge-2.0.so.0 (0x00007f65719fb000) libepoxy.so.0 => /usr/lib64/libepoxy.so.0 (0x00007f65718c3000) libfribidi.so.0 => /usr/lib64/libfribidi.so.0 (0x00007f65718a5000) libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0 (0x00007f657188c000) libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f657187d000) libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007f6571878000) libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f6571873000) libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0 (0x00007f6571831000) libwayland-cursor.so.0 => /usr/lib64/libwayland-cursor.so.0 (0x00007f6571827000) libwayland-egl.so.1 => /usr/lib64/libwayland-egl.so.1 (0x00007f6571822000) libwayland-client.so.0 => /usr/lib64/libwayland-client.so.0 (0x00007f657180e000) libthai.so.0 => /usr/lib64/libthai.so.0 (0x00007f6571803000) libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007f657175d000) libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f6571748000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f6571743000) libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007f657173c000) libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007f657172c000) libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f6571693000) libmount.so.1 => /usr/lib64/libmount.so.1 (0x00007f6571632000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f6571619000) libffi.so.7 => /usr/lib64/libffi.so.7 (0x00007f657160d000) libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f6571573000) libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f657156a000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f6571565000) libcroco-0.6.so.3 => /usr/lib64/libcroco-0.6.so.3 (0x00007f6571527000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f657150d000) /lib64/ld-linux-x86-64.so.2 (0x00007f6573ae9000) libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007f657144e000) libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f657142e000) libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f65713f9000) libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f65713d4000) libp11-kit.so.0 => /usr/lib64/libp11-kit.so.0 (0x00007f65712a2000) libidn2.so.0 => /usr/lib64/libidn2.so.0 (0x00007f6571281000) libunistring.so.2 => /usr/lib64/libunistring.so.2 (0x00007f65710fc000) libtasn1.so.6 => /usr/lib64/libtasn1.so.6 (0x00007f65710e8000) libnettle.so.6 => /usr/lib64/libnettle.so.6 (0x00007f65710ad000) libhogweed.so.4 => /usr/lib64/libhogweed.so.4 (0x00007f6571073000) libatspi.so.0 => /usr/lib64/libatspi.so.0 (0x00007f657103c000) libdatrie.so.1 => /usr/lib64/libdatrie.so.1 (0x00007f6571032000) libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007f6570f75000) libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007f6570f41000) libblkid.so.1 => /usr/lib64/libblkid.so.1 (0x00007f6570eeb000) liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007f6570ec9000) libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007f6570ec2000) libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007f6570da2000) libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007f6570d7e000) cairo build: linux-vdso.so.1 (0x00007ffc90f57000) libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007ffadd687000) libjpeg.so.8 => /usr/lib64/libjpeg.so.8 (0x00007ffadd5ef000) libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007ffadd5ac000) libz.so.1 => /lib64/libz.so.1 (0x00007ffadd592000) libgif.so.7 => /usr/lib64/libgif.so.7 (0x00007ffadd587000) libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x00007ffadd574000) libgtk-3.so.0 => /usr/lib64/libgtk-3.so.0 (0x00007ffadce71000) libgdk-3.so.0 => /usr/lib64/libgdk-3.so.0 (0x00007ffadcd73000) libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007ffadcd63000) libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007ffadcd19000) libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007ffadccf0000) libcairo-gobject.so.2 => /usr/lib64/libcairo-gobject.so.2 (0x00007ffadcce4000) libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007ffadcbaa000) libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0 (0x00007ffadcb82000) libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007ffadc9b2000) libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007ffadc956000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007ffadc832000) libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007ffadc827000) libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007ffadc807000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007ffadc6c4000) libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007ffadc6bf000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007ffadc694000) libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007ffadc687000) librsvg-2.so.2 => /usr/lib64/librsvg-2.so.2 (0x00007ffadc117000) libm.so.6 => /lib64/libm.so.6 (0x00007ffadbfd0000) librt.so.1 => /lib64/librt.so.1 (0x00007ffadbfc5000) libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007ffadbf71000) libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007ffadbf64000) libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007ffadbf5f000) libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007ffadbf57000) libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007ffadbf40000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007ffadbdd5000) libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007ffadbda3000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ffadbd77000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ffadbcbd000) libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007ffadbc76000) libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007ffadbb77000) libotf.so.0 => /usr/lib64/libotf.so.0 (0x00007ffadbb5f000) libm17n-core.so.0 => /usr/lib64/libm17n-core.so.0 (0x00007ffadbb30000) libm17n-flt.so.0 => /usr/lib64/libm17n-flt.so.0 (0x00007ffadbb23000) libgnutls.so.30 => /usr/lib64/libgnutls.so.30 (0x00007ffadb96c000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffadb94b000) libanl.so.1 => /lib64/libanl.so.1 (0x00007ffadb943000) libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007ffadb8ab000) libc.so.6 => /lib64/libc.so.6 (0x00007ffadb6e7000) liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007ffadb6b1000) libjbig.so.2 => /usr/lib64/libjbig.so.2 (0x00007ffadb6a3000) libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007ffadb69d000) libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007ffadb688000) libatk-bridge-2.0.so.0 => /usr/lib64/libatk-bridge-2.0.so.0 (0x00007ffadb651000) libepoxy.so.0 => /usr/lib64/libepoxy.so.0 (0x00007ffadb519000) libfribidi.so.0 => /usr/lib64/libfribidi.so.0 (0x00007ffadb4fb000) libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0 (0x00007ffadb4e2000) libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007ffadb4d5000) libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007ffadb4ce000) libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007ffadb4c9000) libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0 (0x00007ffadb487000) libwayland-cursor.so.0 => /usr/lib64/libwayland-cursor.so.0 (0x00007ffadb47d000) libwayland-egl.so.1 => /usr/lib64/libwayland-egl.so.1 (0x00007ffadb478000) libwayland-client.so.0 => /usr/lib64/libwayland-client.so.0 (0x00007ffadb466000) libthai.so.0 => /usr/lib64/libthai.so.0 (0x00007ffadb459000) libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007ffadb3b3000) libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007ffadb39e000) libdl.so.2 => /lib64/libdl.so.2 (0x00007ffadb399000) libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007ffadb394000) libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007ffadb384000) libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007ffadb2e9000) libmount.so.1 => /usr/lib64/libmount.so.1 (0x00007ffadb288000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ffadb26f000) libffi.so.7 => /usr/lib64/libffi.so.7 (0x00007ffadb263000) libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007ffadb1cb000) libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007ffadb1c0000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007ffadb1bb000) libcroco-0.6.so.3 => /usr/lib64/libcroco-0.6.so.3 (0x00007ffadb17d000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ffadb163000) /lib64/ld-linux-x86-64.so.2 (0x00007ffadd726000) libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007ffadb0a6000) libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007ffadb084000) libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007ffadb04f000) libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007ffadb02a000) libp11-kit.so.0 => /usr/lib64/libp11-kit.so.0 (0x00007ffadaef8000) libidn2.so.0 => /usr/lib64/libidn2.so.0 (0x00007ffadaed9000) libunistring.so.2 => /usr/lib64/libunistring.so.2 (0x00007ffadad54000) libtasn1.so.6 => /usr/lib64/libtasn1.so.6 (0x00007ffadad3e000) libnettle.so.6 => /usr/lib64/libnettle.so.6 (0x00007ffadad03000) libhogweed.so.4 => /usr/lib64/libhogweed.so.4 (0x00007ffadacc9000) libatspi.so.0 => /usr/lib64/libatspi.so.0 (0x00007ffadac94000) libdatrie.so.1 => /usr/lib64/libdatrie.so.1 (0x00007ffadac8a000) libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007ffadabcb000) libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007ffadab97000) libblkid.so.1 => /usr/lib64/libblkid.so.1 (0x00007ffadab41000) liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007ffadab21000) libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007ffadab1a000) libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007ffada9f8000) libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007ffada9d4000) Steve Berman ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-21 11:28 ` Stephen Berman @ 2019-06-22 3:08 ` YAMAMOTO Mitsuharu 2019-06-22 9:06 ` Stephen Berman 0 siblings, 1 reply; 9+ messages in thread From: YAMAMOTO Mitsuharu @ 2019-06-22 3:08 UTC (permalink / raw) To: Stephen Berman; +Cc: emacs-devel On Fri, 21 Jun 2019 20:28:45 +0900, Stephen Berman wrote: > > > Whether it is selected automatically in the default setting is > > another problem and depends on several factors. What are the > > outputs of the ldd command for both non-cairo and cairo builds? > > Appended below; the only substantive difference (beside the addresses) > is that only the non-cairo build includes this: > > libXft.so.2 => /usr/lib64/libXft.so.2 > > non-cairo build: Thanks. Please get the latest master and show the results of the following on both builds: 1. $ emacs -Q -D & 2. (setq font-log nil) C-j 3. (insert 4768) C-j 4. M-x font-show-log RET YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-22 3:08 ` YAMAMOTO Mitsuharu @ 2019-06-22 9:06 ` Stephen Berman 2019-06-22 9:32 ` mituharu 0 siblings, 1 reply; 9+ messages in thread From: Stephen Berman @ 2019-06-22 9:06 UTC (permalink / raw) To: YAMAMOTO Mitsuharu; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 820 bytes --] On Sat, 22 Jun 2019 12:08:18 +0900 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> wrote: > On Fri, 21 Jun 2019 20:28:45 +0900, > Stephen Berman wrote: >> >> > Whether it is selected automatically in the default setting is >> > another problem and depends on several factors. What are the >> > outputs of the ldd command for both non-cairo and cairo builds? >> >> Appended below; the only substantive difference (beside the addresses) >> is that only the non-cairo build includes this: >> >> libXft.so.2 => /usr/lib64/libXft.so.2 >> >> non-cairo build: > > Thanks. Please get the latest master and show the results of the > following on both builds: > > 1. $ emacs -Q -D & > 2. (setq font-log nil) C-j > 3. (insert 4768) C-j > 4. M-x font-show-log RET Attached. Steve Berman [-- Attachment #2: font-log-xft --] [-- Type: application/octet-stream, Size: 3351 bytes --] default fontset: font for: 4768 ftfont-list: -ADBO-Source Code Pro-*-iso10646-1:script=ethiopic xfont-list: -ADBO-Source Code Pro-*-*-*-*-*-*-*-*-*-*-iso10646-1 list: -ADBO-Source Code Pro-*-iso10646-1:script=ethiopic ftfont-list: -*-Source Code Pro-*-iso10646-1:script=ethiopic xfont-list: -*-Source Code Pro-*-*-*-*-*-*-*-*-*-*-iso10646-1 list: -*-Source Code Pro-*-iso10646-1:script=ethiopic ftfont-list: -ADBO-*-iso10646-1:script=ethiopic xfont-list: -ADBO-*-*-*-*-*-*-*-*-*-*-*-iso10646-1 list: -ADBO-*-iso10646-1:script=ethiopic ftfont-list: -*-iso10646-1:script=ethiopic -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 -MUTT-MUTT ClearlyU Wide-normal-normal-normal-*-17-*-123-iso10646-1 -PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-0-iso10646-1 -1ASC-Droid Sans Ethiopic-normal-normal-normal-*-0-iso10646-1 -GNU-GNU Unifont-normal-normal-normal-Sans-Serif-16-*-c-80-iso10646-1 -1ASC-Droid Sans Ethiopic-bold-normal-normal-*-0-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-18-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-15-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-20-*-c-100-iso10646-1 xfont-list: -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1 -mutt-clearlyu-medium-r-normal--17-*-100-100-p-123-iso10646-1 list: -*-iso10646-1:script=ethiopic -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 -MUTT-MUTT ClearlyU Wide-normal-normal-normal-*-17-*-123-iso10646-1 -PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-0-iso10646-1 -1ASC-Droid Sans Ethiopic-normal-normal-normal-*-0-iso10646-1 -GNU-GNU Unifont-normal-normal-normal-Sans-Serif-16-*-c-80-iso10646-1 -1ASC-Droid Sans Ethiopic-bold-normal-normal-*-0-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-18-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-15-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-20-*-c-100-iso10646-1 -mutt-clearlyu-medium-r-normal--17-*-100-100-p-123-iso10646-1 sort-by: -*-normal-normal-normal-*-13-* xfthb:-Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 open: -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1:script=ethiopic xfthb:-Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 list: -ADBO-Source Code Pro-*-iso10646-1:script=ethiopic list: -*-Source Code Pro-*-iso10646-1:script=ethiopic list: -ADBO-*-iso10646-1:script=ethiopic list: -*-iso10646-1:script=ethiopic -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 -MUTT-MUTT ClearlyU Wide-normal-normal-normal-*-17-*-123-iso10646-1 -PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-0-iso10646-1 -1ASC-Droid Sans Ethiopic-normal-normal-normal-*-0-iso10646-1 -GNU-GNU Unifont-normal-normal-normal-Sans-Serif-16-*-c-80-iso10646-1 -1ASC-Droid Sans Ethiopic-bold-normal-normal-*-0-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-18-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-15-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-20-*-c-100-iso10646-1 -mutt-clearlyu-medium-r-normal--17-*-100-100-p-123-iso10646-1 sort-by: -*-normal-normal-normal-*-13-* xfthb:-PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-0-iso10646-1 open: -PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-0-iso10646-1:script=ethiopic xfthb:-PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-13-*-0-iso10646-1 [-- Attachment #3: font-log-cairo --] [-- Type: application/octet-stream, Size: 2252 bytes --] default fontset: font for: 4768 ftfont-list: -ADBO-Source Code Pro-*-iso10646-1:script=ethiopic xfont-list: -ADBO-Source Code Pro-*-*-*-*-*-*-*-*-*-*-iso10646-1 list: -ADBO-Source Code Pro-*-iso10646-1:script=ethiopic ftfont-list: -*-Source Code Pro-*-iso10646-1:script=ethiopic xfont-list: -*-Source Code Pro-*-*-*-*-*-*-*-*-*-*-iso10646-1 list: -*-Source Code Pro-*-iso10646-1:script=ethiopic ftfont-list: -ADBO-*-iso10646-1:script=ethiopic xfont-list: -ADBO-*-*-*-*-*-*-*-*-*-*-*-iso10646-1 list: -ADBO-*-iso10646-1:script=ethiopic ftfont-list: -*-iso10646-1:script=ethiopic -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 -MUTT-MUTT ClearlyU Wide-normal-normal-normal-*-17-*-123-iso10646-1 -PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-0-iso10646-1 -1ASC-Droid Sans Ethiopic-normal-normal-normal-*-0-iso10646-1 -GNU-GNU Unifont-normal-normal-normal-Sans-Serif-16-*-c-80-iso10646-1 -1ASC-Droid Sans Ethiopic-bold-normal-normal-*-0-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-18-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-15-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-20-*-c-100-iso10646-1 xfont-list: -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1 -mutt-clearlyu-medium-r-normal--17-*-100-100-p-123-iso10646-1 list: -*-iso10646-1:script=ethiopic -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 -MUTT-MUTT ClearlyU Wide-normal-normal-normal-*-17-*-123-iso10646-1 -PfEd-Goha-Tibeb Zemen-normal-normal-normal-*-0-iso10646-1 -1ASC-Droid Sans Ethiopic-normal-normal-normal-*-0-iso10646-1 -GNU-GNU Unifont-normal-normal-normal-Sans-Serif-16-*-c-80-iso10646-1 -1ASC-Droid Sans Ethiopic-bold-normal-normal-*-0-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-18-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-15-*-c-90-iso10646-1 -Misc-Misc Fixed-normal-normal-normal-*-20-*-c-100-iso10646-1 -mutt-clearlyu-medium-r-normal--17-*-100-100-p-123-iso10646-1 sort-by: -*-normal-normal-normal-*-13-* ftcrhb:-Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 open: -Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1:script=ethiopic ftcrhb:-Misc-Misc Fixed Wide-normal-normal-normal-ja-13-*-c-120-iso10646-1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-22 9:06 ` Stephen Berman @ 2019-06-22 9:32 ` mituharu 2019-06-22 9:48 ` Stephen Berman 0 siblings, 1 reply; 9+ messages in thread From: mituharu @ 2019-06-22 9:32 UTC (permalink / raw) To: Stephen Berman; +Cc: emacs-devel >> Thanks. Please get the latest master and show the results of the >> following on both builds: >> >> 1. $ emacs -Q -D & >> 2. (setq font-log nil) C-j >> 3. (insert 4768) C-j >> 4. M-x font-show-log RET > > Attached. Thanks. Could you try the patch below? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 0cc40b4c944..f15e79334ac 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -25,6 +25,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include "lisp.h" #include "xterm.h" #include "blockinput.h" +#include "charset.h" #include "composite.h" #include "font.h" #include "ftfont.h" @@ -308,6 +309,17 @@ ftcrfont_has_char (Lisp_Object font, int c) if (FONT_ENTITY_P (font)) return ftfont_has_char (font, c); + struct charset *cs = NULL; + + if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qja) + && charset_jisx0208 >= 0) + cs = CHARSET_FROM_ID (charset_jisx0208); + else if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qko) + && charset_ksc5601 >= 0) + cs = CHARSET_FROM_ID (charset_ksc5601); + if (cs) + return (ENCODE_CHAR (cs, c) != CHARSET_INVALID_CODE (cs)); + return -1; } ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: Cairo font selection for Ethiopic 2019-06-22 9:32 ` mituharu @ 2019-06-22 9:48 ` Stephen Berman 0 siblings, 0 replies; 9+ messages in thread From: Stephen Berman @ 2019-06-22 9:48 UTC (permalink / raw) To: mituharu; +Cc: emacs-devel On Sat, 22 Jun 2019 18:32:46 +0900 mituharu@math.s.chiba-u.ac.jp wrote: >>> Thanks. Please get the latest master and show the results of the >>> following on both builds: >>> >>> 1. $ emacs -Q -D & >>> 2. (setq font-log nil) C-j >>> 3. (insert 4768) C-j >>> 4. M-x font-show-log RET >> >> Attached. > > Thanks. Could you try the patch below? Did it, and now HELLO in Emacs -Q in both the Cairo and non-Cairo builds displays the Amharic and Tigrigna script samples with Goha-Tibeb Zemen. Thanks. Steve Berman ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-06-22 9:48 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-06-20 19:30 Cairo font selection for Ethiopic Stephen Berman 2019-06-21 1:54 ` YAMAMOTO Mitsuharu 2019-06-21 8:05 ` Stephen Berman 2019-06-21 10:52 ` mituharu 2019-06-21 11:28 ` Stephen Berman 2019-06-22 3:08 ` YAMAMOTO Mitsuharu 2019-06-22 9:06 ` Stephen Berman 2019-06-22 9:32 ` mituharu 2019-06-22 9:48 ` Stephen Berman
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.