freetype-devel
[Top][All Lists]
Advanced

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

Re: Set_Pixel_Sizes for TTF


From: Yamano-uchi, Hidetoshi
Subject: Re: Set_Pixel_Sizes for TTF
Date: Sun, 15 Oct 2000 23:21:31 +0900

Hi Werner,

From: Werner LEMBERG <address@hidden>
Subject: Re: Set_Pixel_Sizes for TTF
Date: Wed, 11 Oct 2000 19:53:06 +0200 (CEST)
Message-ID: <address@hidden>

> > > I think the behaviour of FT should be changed that for bitmap
> > > fonts only FT_Set_Pixel_Sizes() works, giving an error if the font
> > > is an outline font.  The opposite for FT_Set_Char_Size().  Maybe
> > > there is a better solution -- but doing nothing is bad.
> > 
> > It should work fine for 1 to 3.  But in the cases of 4 and 5, we
> > sometime use sbits if avaliable, otherwith use outlines.  Your
> > convention is incovinient for this style.
> 
> Ok.
> 
> > A. Set_Char_Size sets outline's size, and set sbit's when
> > Set_Pixel_Size is not applied.
> > B. Set_Pixel_Size sets sbit's size, and set outline's when
> > Set_Char_Size is not applied.
> 
> Sounds nice.  Can you provide a patch?

Wait for a while.  There is another problem.  When we use above APIs,
sbit's ppem pair are different from outline's metrics.  It is
reasonable for handling glyphs correctly.  On the other hand
face->size->metrics has ONE ppem pair.  I think face->size->metrics
should be filled with outline's one.  Therefore there are no ways
obtaing sbit's size.

Plan 0:
  Set_Pixel_Size changes sbit's metrics.
  Set_Char_Size changes outline's one.
Plan 1:
  Set_{Pixel,Char}_Size overrides metrics of outline and sbit's one.
Plan 2:
  Plan 1 +
  I. When Set_Pixel_Size has already applied, Set_Char_Size fails.
  II. When Set_Char_Size has already applied, Set_Pixel_Size fails.
Plan 3:
  We provide APIs A and B, and hide sbit's metrics.
Plan 4:
  We provide APIs A and B and face->size->fixed_size_metrics.
Plan 5:-(
  We ignore sbit.

All plans are not nice.
Plan 0   : As I said, it is not convinient for some cases.
Plan 1, 2: It violates the above convention you said.
Plan 3   : There are no ways obtaing sbit's metrics.
Plan 4   : It is resonable but not suitable with the "FT modular
           structure". 
Plan 5   : ......

Any comments or other ideas?

----- Yamano-uchi, Hidetoshi


reply via email to

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