GNOME Bugzilla – Bug 641808
Font tool: font list shows hidden foreign-language fonts in Windows Vista/7
Last modified: 2018-05-24 12:56:38 UTC
Windows Vista and Windows 7 have the capability to hide fonts that are not designed for your current language, which is on by default. The setting, at least on Windows 7, is at Start->Control Panel->Fonts->Font settings, and is labelled "Hide fonts based on language settings". With this ticked, applications will only show fonts designed for the language that Windows is set to. The GIMP, however, always shows all fonts on the system. This is kind of a bad thing as Windows 7 typically comes with tons of these fonts, which are of no use to me. The GIMP should ideally honour the setting. I didn't know if this was a GIMP bug or a GTK bug, and when I asked in the #gimp channel on Freenode, it was suggested that I file it as a GIMP bug. So, here it is. :)
Oh yeah, I'm using GIMP 2.6.11. Sorry for not making that clear. I also searched Bugzilla to see if I could find anything about this and couldn't find anything.
How do other programs - especially other graphics applications - handle this?
Seems like Adobe has run into the same problem: http://forums.adobe.com/message/2861611 http://forums.adobe.com/message/3055925 Microsoft engineer on how to remove the extra fonts: http://social.answers.microsoft.com/Forums/en-US/w7desktop/thread/60f5ac05-182e-438f-88e4-2a7432d8e161 But I'm not finding much on how to detect/ignore those fonts from a dev perspective. From here: http://msdn.microsoft.com/en-us/library/dd162615(VS.85).aspx I found this function (EnumFontFamiliesEx): http://msdn.microsoft.com/en-us/library/dd162620(v=VS.85).aspx That appears to take a 'character set' argument - though I don't know if that's helpful or not. I don't know anything about how the font list is generated - particularly on Windows.
Dangit... from http://msdn.microsoft.com/en-us/library/dd317704%28v=vs.85%29.aspx: "In Windows 7, there are no APIs for directly querying which fonts are hidden, or for setting fonts to be hidden." However, I did find out that the hidden fonts are available from the "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Font Management" key in the string value "Inactive Fonts". On my system, the content of that value is: Large Fonts 8514oem Marlett Andalus Arial Unicode MS Arabic Typesetting HGMaruGothicMPRO Estrangelo Edessa Microsoft Uighur MV Boli Sakkal Majalla Simplified Arabic Simplified Arabic Fixed Traditional Arabic FangSong KaiTi Microsoft YaHei NSimSun SimHei SimSun SimSun-ExtB DFKai-SB Microsoft JhengHei MingLiU MingLiU-ExtB MingLiU_HKSCS MingLiU_HKSCS-ExtB PMingLiU PMingLiU-ExtB Euphemia Lao UI Plantagenet Cherokee Aharoni David FrankRuehl Gisha Levenim MT Miriam Miriam Fixed Narkisim Rod Aparajita Gautami Iskoola Pota Kalinga Kartika Kokila Latha Mangal Raavi Shonar Bangla Shruti Tunga Utsaah Vani Vijaya Vrinda Meiryo Meiryo UI MS Gothic MS Mincho MS PGothic MS PMincho MS UI Gothic Batang BatangChe Dotum DotumChe Gulim GulimChe Gungsuh GungsuhChe Malgun Gothic Ebrima Microsoft Himalaya Microsoft New Tai Lue Microsoft PhagsPa Microsoft Tai Le Microsoft Yi Baiti Mongolian Baiti Nyala Sylfaen Angsana New AngsanaUPC Browallia New BrowalliaUPC Cordia New CordiaUPC DaunPenh DilleniaUPC DokChampa EucrosiaUPC FreesiaUPC IrisUPC JasmineUPC Khmer UI KodchiangUPC Leelawadee LilyUPC MoolBoran FZShuTi FZYaoTi LiSu STCaiyun STFangsong STHupo STKaiti STLiti STSong STXihei STXingkai STXinwei STZhongsong YouYuan HGGothicE HGGothicM HGGyoshotai HGKyokashotai HGMinchoB HGMinchoE HGPGothicE HGPGothicM HGPGyoshotai HGPKyokashotai HGPMinchoB HGPMinchoE HGPSoeiKakugothicUB HGPSoeiKakupoptai HGPSoeiPresenceEB HGSeikaishotaiPRO HGSGothicE HGSGothicM HGSGyoshotai HGSKyokashotai HGSMinchoB HGSMinchoE HGSoeiKakugothicUB HGSoeiKakupoptai HGSoeiPresenceEB HGSSoeiKakugothicUB HGSSoeiKakupoptai HGSSoeiPresenceEB Ami R Expo M Headline R HYGothic HYGothic-Extra HYGraphic HYGungSo HYHeadLine HYMyeongJo-Extra HYPMokGak HYPost HYShortSamul HYSinMyeongJo Magic R MoeumT R New Gulim Pyunji R Yet R Ahn B Ahn L Ahn M Batang Old Koreul Big Round R Big Sans R Dotum Old Koreul Expo B Expo L Garam B Gothic B Gothic L Gothic Newsletter Gothic R Gothic Round B Gothic Round L Gothic Round R Gothic Round XB Gothic XB Graphic B Graphic New R Graphic R Graphic Sans B Graphic Sans R Gungsuh Old Koreul Gungsuh R Headline Sans R HYBackSong HYBudle HYHaeSo HYKHeadLine HYLongSamul HYMokGak HYMokPan HYMyeongJo HYPillGi HYPMokPan HYRGothic HYSeNse HYSinGraphic HYSinMun-MyeongJo HYSooN-MyeongJo HYTaJa HYTaJaFull HYTeBack HYYeaSo HYYeasoL HYYeatGul Jasu B Jasu L Jasu R Jasu XB Meorimyungjo B Meorimyungjo XB Modak R MoeumT B MoeumT L MoeumT XB Myungjo B Myungjo L Myungjo Newsletter Myungjo R Myungjo SK B Myungjo XB Namu B Namu L Namu R Namu XB New Batang New Dotum New Gungsuh NewGulim Old Koreul NewGulim Old Hangul Batang Old Hangul Dotum Old Hangul Gungsuh Old Hangul Pam B Pam L Pam M Pam New B Pam New L Pam New M Panhwa R Saenaegi B Saenaegi L Saenaegi R Saenaegi XB Sam B Sam L Sam M Sam New B Sam New L Sam New M Soha R Woorin R Yeopseo R Yet Sans XB Yet Sans B Yet Sans L Yet Sans R I can confirm that when I untick the option to hide fonts based on language settings, this string value no longer exists, so it should be possible to just read this value and use it to indiscriminately filter the font list, I think.
So if we wanted to do what Explorer does and "hide" some "foreign-language" fonts, we would of course need an option for that. Lots of people do need "foreign" language fonts now and then. I find the whole term "foreign-language font" a bit offensive, actually. By default the option would be off, all fonts would be listed. But anyway, does GIMP really need another obscure option? I'd say we should just let this thing rest and instead wait for/encourage somebody to implement some kind of automatic hierarchical grouping of fonts. *That* would be really useful, even if you use just fonts for one script. (I mean both obvious *typographic* grouping like "sans-serif breadtext", "serif display", "slab serif" and user-defined grouping. Plus tagging, of course. And this hierarchical resource grouping and tagging functionality would hopefully be used for brushes, patterns, gradients etc too.) Of course, if somebody comes up with actual code that implements optionally taking that Registry value into consideration, it would be another thing...
I had at first thought about the idea of an option, although when you think about it there already is an option for it, in Windows itself. That's why I said it could be indiscriminately done, as the value of the registry key will always represent the fonts that are actually hidden on the system; a GIMP option would do precisely nothing if there were no hidden fonts. BTW, I also didn't like the term "foreign-language fonts" but I had been unsure what else to call them. I very specifically did not say "non-English fonts" because that just isn't accurate. However, it turns out that "foreign-language fonts2 isn't entirely accurate either; the user can individually hide/unhide fonts at will in order to have them included in the same list, and the option to hide fonts based on language just does this in bulk for any fonts that don't match with the OS's language. So I'll use the term "hidden fonts" instead, and I can adjust the title of this bug to suit if wanted, but I'll keep it as-is for now in case people are using it to find it. > But anyway, does GIMP really need another obscure option? I'm a big fan of not including options if they're not necessary. (See http://www.joelonsoftware.com/items/2006/11/21.html for more on the topic that happens to match my thoughts.) That's why I suggested not having an option for this; it's not really GIMP's requirement to provide an option if it already exists at the OS level. However, I *do* think it should be made fairly obvious somehow if the font list is filtering fonts, because as you say, there are people who *will* require hidden fonts even if they're not aware that such fonts are being hidden. > I'd say we should just let this thing rest and instead wait for/encourage > somebody to implement some kind of automatic hierarchical grouping of fonts. Then the feature will probably never be written. That sort of thing probably isn't terribly easy to do automatically due to a lack of descriptive metadata, and in the case that a font type does provide metadata, it'd need to be done differently for each font type (TrueType, OpenType, Type 1, etc), unless the OS/font manager provides an API for that. (I don't believe Windows does, but I could be wrong about that.)
Do you really think that this Windows feature is something our target user group would ever want to be respected by any software they're using?
IMO at the very least the "hidden" fonts should be moved to the end of the list (this is what CS3 tries to do on XP). But my vote would be to not display them at all if they are marked "hidden" in the OS - no GIMP setting/option, just hide them. That's a rather large list of fonts. I haven't installed on Win 7 yet, but I think a huge list of unwanted (marked as hidden by the user or the OS) fonts is a usability problem.
Couple of comments: > That sort of thing probably isn't terribly easy to do > automatically due to a lack of descriptive metadata But we already have code in there to do a "clever" decision on what sample string to show for the fonts based on a guesstimate of the main script the font is designed for. At least we used to have. > marked "hidden" in the OS I wouldn't go so far to say that it's the OS that marks them hidden. If it was, surely then the OS would then not return them when an application uses the OS APIs to enumerate fonts? Or at least offer an option in such APIs to skip such hidden fonts? (Or maybe it does?) It's just one application that happens to come bundled with the OS, and yeah, has a special purpose and is hard to replace, i.e. Explorer, that offers this hiding option... But oh well.
> But we already have code in there to do a "clever" decision on what sample > string to show for the fonts based on a guesstimate of the main script the > font is designed for. At least we used to have. That's true, but it's still only a guess, and I think that for many of the hidden fonts in Windows 7, it guesses wrongly; that said, I haven't examined them too closely, so I could well be wrong. > Do you really think that this Windows feature is something our target user > group would ever want to be respected by any software they're using? Well, that depends on what your target user group is. Personally, I figured that the target user group would be people who work with graphics in some way, and to me that doesn't say "wants to see all fonts on the system even if they don't have alternative typefaces". (Most of the fonts, when they provide Latin characters at all, would use the same glyphs for those codepoints.) > I wouldn't go so far to say that it's the OS that marks them hidden. If it > was, surely then the OS would then not return them when an application uses > the OS APIs to enumerate fonts? Or at least offer an option in such APIs to > skip such hidden fonts? (Or maybe it does?) I can't answer this one. I don't think such an option does exist, and it's a bit of a pain. However, see the next part of this comment: > It's just one application that happens to come bundled with the OS, and yeah, > has a special purpose and is hard to replace, i.e. Explorer, that offers this > hiding option... But oh well. Actually, it happens with any application that uses the standard Font common dialog via ChooseFont(), as was stated in the page I linked to earlier. Most do, so most get this new behaviour for free. It's only the ones that use a custom font choosing interface that still get the full list of fonts. > IMO at the very least the "hidden" fonts should be moved to the end of the > list (this is what CS3 tries to do on XP). I would be happy with this behaviour. (Though I must admit I didn't even know you could hide fonts in XP! I guess it was a manual thing.)
Shouldn't this be handled at the fontconfig level, and not in applications (with the exception of using ways provided by fontconfig to change the behaviour, perhaps)? Maybe it has already been discussed in the fontconfig project?
Reading the article 'Text handling in GIMP' [1] I'd say text handling in GIMP has not only an informational and semantic purpose, but also a strong artistic purpose. Showing international fonts gives more creative freedom. So I would not hide them by default or a hidden system setting. That option should be discussed in the process of rethinking the text handling. Thus changing this bug report to an enhancement. A workaround to access a particular font easily is to type in parts of the fontname in the Text tools dialog. GIMP automatically suggests matching font names resp. completes the font name. I hope this helps you, Sophie. [1] http://gui.gimp.org/index.php/Text-Handling_in_GIMP#Introduction
-- 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/gimp/issues/358.