I want to add a new font to squeak. I picked Windows' Tahoma as a first example because I like it as a clean and narrow font for menus and dialogs. I managed to create a single strike font (using Andreas' old STFONT.EXE program) per font - but then the problems start...
I want to combine at least Tahoma-Regular and Tahoma-Bold in such a way that Squeak knows only a single Tahoma font which can be displayed in bold and regular style. It Squeak tried to a synthetic bold font, the result is very ugly.
However, after studying the StrikeFont class, I believe that this isn't possible, is it? This would at least explain, why Squeak knows ComicPlain and ComicBold instead of a single Comic font. I manually tweaked the regular strike font to know the bold one as derivate but this link will go away on shutdown.
Has anybody fixed this already? As usual, I'm working on 2.6.
I'd probably start with changing "StrikeFont>>reset" which resets the cache of synthetic fonts. This might be a good place to use a list of variant fonts to initialize the cache from. Another possible way could be to change "StrikeFont>>emphasized:" and lookup the font with a variant name in the TextConstants pool dictionary first before creating a synthetic font.
However, I don't see any clean way how to use size, pointSize, name, familyName, familySizeFace, emphasis and so on without documentation. Any help is welcome.
bye -- Stefan Matthias Aust // Bevor wir fallen, fallen wir lieber auf.
squeak-dev@lists.squeakfoundation.org