freetype-devel
[Top][All Lists]
Advanced

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

Re: [ttf2pt1-devel] Re: FreeType front-end in ttf2pt1


From: Werner LEMBERG
Subject: Re: [ttf2pt1-devel] Re: FreeType front-end in ttf2pt1
Date: Sun, 15 Oct 2000 12:07:57 +0200 (CEST)

> What I would propose is similar to the 'dynamic_cast' template in
> C++ (and often referred to as 'narrowing', or 'downcasting': Given
> the current (general) API, you may add a method which 'tries' to
> cast the font type to a special font type.  As with dynamic_cast,
> this call will simply return 0 if the font isn't of the required
> type, the sub type if it is.
> 
> FT_Face face;
> // create the face here
> 
> TT_Face ttface;
> if (narrow_to_TT(face, ttface) == -1) { // error...};
> 
> // now you can operate on TT_Face, which provides a richer API than FT_Face

Yes, such things already exist in FreeType, and I also think this is
the right way to access all data for a particular font format.

But I'm also asking for a general interface which allows an
application to query certain features without knowing the font
format; something like

  error = FT_Query_String ( face,
                            FT_FONT_COPYRIGHT,
                            &copyright_string );

Other good candidates are FT_FONT_FAMILY, FT_FONT_SHAPE, ...

Which features are generic enough to be queried like this?


    Werner



reply via email to

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