ex11, plotting and Cairo ...
David Hopwood
david.nospam.hopwood@REDACTED
Thu Jul 21 10:14:15 CEST 2005
Joe Armstrong (AL/EAB) wrote:
> On Behalf Of Peter-Henry Mander
>>
>>Sorry Joe, I know what you'd like to see since I'm an ex-typography
>>student and I appreciate your aesthetic inclination, but the
>>concurrency model and thin layers is what I want above the kerning,
>>antialiasing, etc.
>
> But the primitives are the same! - suppose I have a primitive
>
> draw(Win, character, X, Y, font, glyfNumber)
>
> Which draws a particular Glyf at a X, Y then I get kerning by a "better" computation
> of where X and Y are - a stupid algorithm just takes the bounding box width to compute
> where the next character should go.
APIs that only draw individual glyphs don't work adequately with "complex"
scripts [*]. Although in principle you can have glyphs for presentation forms
and have the API/protocol client do all positioning and glyph selection, that
is not how OpenType fonts are designed to work, and if you don't support OpenType
then you'd be reinventing a lot of wheels.
> So given a the same set of primitives we can have quick and dirty or beautiful
> formatting, still with a decent concurrency model and decent layering
Yes, but it should be possible to send a Unicode string over the network protocol,
not just a set of glyphs and positions. The server, which has direct access to
all the font data, is in a better position to do kerning and glyph selection,
especially for large fonts.
[*] Arabic, and various Indic and SE Asian scripts. Unfortunately, complex
scripts are too often interpreted by Western API designers as
"I don't read any of those obscure scripts, so I don't need to think
about that yet."
--
David Hopwood <david.nospam.hopwood@REDACTED>
More information about the erlang-questions
mailing list