freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] Question on MacOS X


From: Sander van der Wal
Subject: Re: [Freetype] Question on MacOS X
Date: Sat, 1 Dec 2001 11:59:59 +0100

----- Original Message -----
From: "Changyuan Hu" <address@hidden>
To: "Leonard Rosenthol" <address@hidden>;
<address@hidden>
Sent: Saturday, December 01, 2001 1:18 AM
Subject: RE: [Freetype] Question on MacOS X


> > >According to the FreeType2 API, the only Mac-specific API is
> > >FT_New_Face_From_FOND, which requires a Handle to FOND resource.
> >
> >          True, but the standard FT_New_Face() on the Mac goes
through some
> > special processing to provide transparent support for Mac OS
fonts.  I
> > would recommend that you use that call instead, so that FT can
deal with
> > all the complexities for you.
>
> Function FT_New_Face() requires font file path name as input. That
is almost useless for a serious application in Windows or Mac, in
which you would allow user to choose font from family name, style and
size, but not from font file selection. It is the same case in
Windows, where you probably use Windows standard ChooseFont() to open
standard font selection dialogue and upon return, you get the handle
to the selected font. Because the Windows ChooseFont() function uses
special algorithm to map user requirement to the font Windows sees as
the best match, using a file dialog to let user choose a font file
directly is not such a nice solution. (That is why I still did not use
FreeType in my Windows application.)

If you let FT_New_Face() handle all this Windows UI level stuff, the
library will get bloated beyond comprehension. There is no reason why
you would not want Mac, XWindows, Symbian OS, PalmOS etc UI level
stuff in there too. Much to complicated.

I recommend the approach that the layer above FT2 handles all the UI
level stuff, using FT_New_Face() and friends to open a font and
extract the info that the host platform UI want to present to the
user.

There's no reason that Windows, MAC, whatever OS UI code cannot be
added to FT2, but not in the engine. It should be completely separate,
just like the current example programs.

Sander van der Wal






reply via email to

[Prev in Thread] Current Thread [Next in Thread]