After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 533426 - win32 fontmaps currently do not load symbol fonts
win32 fontmaps currently do not load symbol fonts
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: win32
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-win32 maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2008-05-16 10:26 UTC by Peter Frentrup
Modified: 2018-05-22 12:42 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
The patch (730 bytes, patch)
2008-05-16 10:27 UTC, Peter Frentrup
none Details | Review
A test program that prints a glyph from a font into a PNG file (4.08 KB, text/x-csrc)
2008-05-16 10:40 UTC, Peter Frentrup
  Details
All glyphs in the math2 font (67.45 KB, application/octet-stream)
2008-05-27 09:21 UTC, Peter Frentrup
  Details

Description Peter Frentrup 2008-05-16 10:26:24 UTC
remove this restriction
Comment 1 Peter Frentrup 2008-05-16 10:27:19 UTC
Created attachment 110989 [details] [review]
The patch
Comment 2 Peter Frentrup 2008-05-16 10:40:09 UTC
Created attachment 110991 [details]
A test program that prints a glyph from a font into a PNG file

Needs cairo and pango.
Example:
pango-test "Symbol 72" 42 out.png

Without the patch, out.png contains a "G" and a warning is generated :
(pango-test.exe:2908): Pango-WARNING **: couldn't load font "Symbol Not-Rotated 72", falling back to "Sans Not-Rotated 72", expect ugly output.

With the patch, everything works fine and out.png contains a Gamma.
Comment 3 Tor Lillqvist 2008-05-27 00:58:34 UTC
I am still not convinced that this is the right thing to do... Sure, the patch is trivial, but... if you need Greek characters, why not use the proper Unicode representation of them, and let the Greek glyphs present in the normal fonts be used instead?

Both the pseudo-fonts like "sans" or "serif", and also most of the normal real Windows fonts like Arial or Georgia do cover Greek. Won't this patch just perpetuate the (MS-DOS age?) misunderstanding that one should use the Symbol font to write Greek, and then use "a" for "α" etc? Are the Greek glyphs in Symbol somehow better that the ones in Times New Roman, Arial, etc?

Sorry if I seem stubborn...
Comment 4 Behdad Esfahbod 2008-05-27 02:23:08 UTC
I just agree with Tor that the change looks bogus, from a general Pango standpoint.
Comment 5 Peter Frentrup 2008-05-27 09:18:50 UTC
My point is not that I need a greek character from a symbol font. 
I am writing a formula editor. As you can imagine, such an editor should be able to show radicals. The unicode standard therefor has two general symbols:
U+221A SQUARE ROOT
U+23B7 RADICAL SYMBOL BOTTOM

That is not enough for good layout. The Math2 font (a symbol font) contains 24 glyphs for laying out radical signs.
Comment 6 Peter Frentrup 2008-05-27 09:21:03 UTC
Created attachment 111590 [details]
All glyphs in the math2 font

Here are all the glyphs of the Math2 font, I mentioned.
Comment 7 Tor Lillqvist 2008-05-27 10:17:47 UTC
OK, thanks. I was hoping you would say exactly something like that, then it indeed makes sense I guess. Should we somehow try to prevent misguided users from using fonts without Unicode cmaps in the normal way, and allow only Peter's way to access it using glyph indexes directly? Is that even possible, no idea. Behdad?

It seems that pangoft2 allows the Symbol font just fine, and if you use it for the string "abc" you get "αβγ", etc. Eek, but I guess it can't be so bad then if pangowin32 does the same.
Comment 8 Behdad Esfahbod 2008-05-27 19:49:27 UTC
/me doesn't have a Symbol font around.

Ideally with all backends, one should be able to load symbol fonts (or any fonts without Unicode cmaps), but not meaningfully use them.  That is, their charset should report to support no character.  You can then use show_glyphstring functions to render individual glyphs using their glyph ide (not fake character code).  This also ensures that the symbol font will not be accidentally used when it's not intended to.

Does that make sense?  It will make using them harder as one can't simply use PangoLayout with them anymore.  An alternative would be to provide something like the PangoFcDecoder, which is a way to attach custom character to glyph mapping to fonts.  That way you can bring symbol fonts back to life if that's really what you want to.

/me wishes PangoFcDecoder was rewrriten generically.
Comment 9 GNOME Infrastructure Team 2018-05-22 12:42:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/135.