[Gnome-print] Re: GNOME font library RFC



On Mon, 29 May 2000, Nathan Hurst wrote:

> On Sun, 28 May 2000, Lauris Kaplinski wrote:
> 
> > Freetype is nice, but gnome-font-system should go a step beyound that and
> > hide all TTF/TypeX specific stuff from user. Most of that is 
> > overcomplicated for users too...
> 
> Fonts are complicated, unfortunetly.  Attempts have been made in the past
> to simplify the interface, but the end result is usually less than
> satisfactory.  I'm sure Owen can list issues that crop up when handling
> international fonts.

International text layout is tough issue - yes. But glyph rendering is
simple. I am quite sure, layout should be left to Pango, but rendering
probably not.

> > All, that user would need in GNOME programs, are IMHO
> > - ArtBpath outline
> 
> These are going to be too slow.  David Turner told me that his design
> beats raph's code, mainly because it is aimed at font's and thus knows
> things that raph's code doesn't.  Also, I don't think ArtBpath's support
> cubic beziers.

You meant quadratic?
Do not forget - computers get faster every year, human abilities stay
constant. So it is generally accepted (I hope), that clean, but not so
efficient API is usually preferred to complex, but efficient one.
What about outline and raster caches? Freetype people specifically said,
they are not interested in adding rendering to RGB/RGBA buffers. For any
efficent font rasterisation, GNOME should have glyph cache - so additional
layer above freetype engine is mandatory.

I am all about using Freetype as rendering library for gnome-fonts. But I
am quite sure its functionality should be hidden from user-level programs
by gnome-font layer. So user simply does:
gnome_font_render_glyph_rgba (font, glyph, buffer, x, y, width, height,
  rowstride, color)
gnome-font layer looks into cache, if it already has Freetype rendered
graymap of that cache. If not, it asks Freetype to render one. That
graymap is then composited to buffer.
The same stands of outlines. wrapper layer should look into cache for
outline, and if not found, construct one, approximating quadratic curves
to cubic ones. Resulting curve can then be fed to additional libart based
processing (clipping, gradienting, stroking etc.)

> 
> > - Various rendered bitmap formats
> 
> I've whinged about the lack of design in this department once before, and
> nobody seems interested.
> 
> > - Glyph set
> > - Ligature lists
> > - Kerning lists
> > - Various metrics
> > - Raw font data
> 
> Freetype provides all of these in an easy to use bundle.



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