Last updated at 12:30 am UTC on 17 January 2006
Andreas Raab has written a plugin to list and render native fonts on win32 platforms.
If we can define a common set of primitive names, each platform can
supply a plugin to allow consistent access to whatever native fonts are available.
I feel strongly in favour of a consistent set of primitives. (ar)
The implementation is in two levels. The first is
StrikeFont, which is the current implementation of fonts. This is based on older model of fonts, that consist of individual bitmaps.
The second is
HostFont, which includes the information available in more modern fonts such as kerning pairs and overhang/underhang information. This info should not get lost if we ever want to get some better font support. Good anti-aliased fonts will also require more information.
The primitives used by
This is the minimum set required for native font support in Squeak???
- primitiveCreateFont: fontName size: fontSize flags: fontFlags weight: fontWeight
- returns a "handle" used to reference this font
- primitiveDestroyFont: fontHandle
- destroy the font referenced by the handle
- primitiveFontAscent: fontHandle
- primitiveFontDescent: fontHandle
- primitiveFont: fontHandle widthOfChar: charIndex
- primitiveFont: fontHandle glyphOfChar: charIndex into: glyphForm
- store the bitmap glyph into a
The primitives used in HostFont
I'm planning on adding some GUI components to make font management (installation and deletion) and changes (via themes) much easier.
I'm planning to use the functions in the Utilities class to be independent of the native fonts.
- Jeff Sparkes