[squeak-dev] Pango fonts and font names query
tim Rowledge
tim at rowledge.org
Thu Jul 31 00:06:23 UTC 2014
A probably simple and not terribly important question for anyone familiar with how Pango/Cairo works wrt font names etc. but I’m curious.
Scratch does some font rendering with Pango, depending upon circumstances. The exact definition of those circumstances is, to say the least, a bit confusing, but never mind. What is puzzling me right now is that with one of asian languages selected (apologies to speakers but I’m not familiar enough with any of them to spot which is which on sight) the StringMorph in use has a StrikeFont (Scratch does some *interesting* things to handle OS font naming) called VerdanaBold installed.
When tracing through to see what happens with it in order to get the proper glyphs on screen we see some name manipulation to go from ‘VerdanaBold' to ‘Verdana' + bold:= true and then the UnicodePlugin interface to Pango is passed
RenderPlugin
primSetFont: fontName
size: fontSize
bold: isBold
italic: false
antialias: antialiasFlag.
… so we are passing ‘Verdana’ as the font name. Which would be fine - and produces appropriate glyphs - except that when listing all the fonts available from Pango, Verdana isn’t in the list. I’m wondering what happens inside all that plugin/library code. Is there a name conversion dictionary in use, some deeply buried config file…?
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Always loses battles of wits because he's unarmed.
More information about the Squeak-dev
mailing list
|