Hello Ian

On 11-Jul-01, you wrote:

> If, as was mentioned in another message, ttf fonts may contain
> suitable characters anyway, is it possible for V to convert the &xxx;
> codes into custom-rendered "glyphs" on the fly?

It's possible.. kinda.. sort of.. to get glyphs from the outline engine.

But rendering them to the screen is more of a chore than anyone
wants to be bothered with. A fully comprehensive replacement API
would be nicer (since to render text by pulling out glyphs, while
still using OS routines, would be appallingly complex, and to do it
by pulling out every glyph and rendering manually would be also
appallingly complex: and potentially incompatible with any future
systems)

> support some more conventional codes like   < > and stuff,
> which must have some special processing going on. 

Sure. It has an internal table of entity names (nbsp, lt, gt, beta) and the
ASCII character code that represents it. It goes through the strings it
gets from the html code and looks for & - then matches entity names,
and terminates depending on certain circumstances (a semicolon, a
space, an invalid character, this is atm not entirely infallible)

It doesn't do any fancy lookups: it just strips the &blah; and replaces
it with the actual code.

> which we all happily installed (thanks to Matt's instructions)
> required some sort of mapping file IIRC which was to do with ISO
> character conversion, could V internally scan a similar file?

Basically a Unicode font is done in a funny way for compatibility,
characters 0-255 are as the ISO-8859-1 (Latin 1) codepage is
specified: since this is the standard ASCII character set, any system
which uses plain 7 or 8 bit characters can use these fonts like any
font that would come with the system.

What the Windows 1252 codepage does is make TTF library make
certain characters available in some special slots when you ask
for those character codes.

You could supply ISO-8859-2 to get Cyrillic characters: and the
codepage definition would simply make it so that ttf.library
supplied those characters when you asked for specific ascii
codes.

At present there is no way to get ttf.library to give you a specific
character set on the fly: it's per font, and/or globally per system,
not per app. Plus it's still limited to 255 fixed characters.

> I never actually intended for my orignial question to have more than a
> yes/no answer, I didn't realise what a can of worms it was. :)

I added support for β • and • today. I can't find the code
for alpha in the normal character set.

Thanks
-- 
Matt <[EMAIL PROTECTED]>

_____________________________________________________________________
Voyager Mailing List - http://v3.vapor.com/
Voyager FAQ....: http://faq.vapor.com/voyager/
Listserver Help: mailto:[EMAIL PROTECTED]?Subject=HELP
Unsubscribe....: mailto:[EMAIL PROTECTED]?Subject=UNSUBSCRIBE

Reply via email to