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: Stefan Seefeld
Subject: Re: [ttf2pt1-devel] Re: FreeType front-end in ttf2pt1
Date: Fri, 13 Oct 2000 19:38:21 -0400

Sergey Babkin wrote:
> 
> Werner LEMBERG wrote:
> 
> > > > Some font formats have absolutely no additional info, others have
> > > > plenty of it...
> > >
> > > Why not make provisions for all the reasonable information, and then
> > > if the font format does not support a particular variable just
> > > return a special value "not available"?
> >
> > Can you list the values which could be useful in your opinion?  May I
> > ask others on the lists to comment this also?
> 
> Well, maybe start with the things defined in TTF and Type1 ?
> By the way, there is one more interesting piece of information
> that is present at least in TTF and Type1: italic angle.

in this case I find the proposition to add a query for particular information
to the general API wrong. The general API should allow access to what is always
available, leaving special variables/features to extension libraries. I know 
that
it is intrinsically difficult to do that properly in C, so I illustrate my point
in C++:

class Font
{
public:
  general_feature get_general_feature();
};

class TTFont : public Font
{
public:
  tt_feature get_tt_feature();
};

the idea is to avoid dynamic typing (which is what you suggest if you want
to query a given font instance for the presence of a specific feature) but 
rather
use static typing, i.e. to make a TTFont a *type*, which can be checked for at
compile time. Only this type and its associated API provides the means to access
TT specific features.

Given the fact that FreeType2 is already pretty object oriented and modular with
respect to font types, I guess it should be rather easy to add extensions to the
individual font modules, instead of bloating the general API.

Regards,        Stefan
_______________________________________________________              
              
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: address@hidden

_______________________________________________________

      ...ich hab' noch einen Koffer in Berlin...



reply via email to

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