[Gnome-print] Re: Gnome text subsystems
- From: Lauris Kaplinski <lauris ariman ee>
- To: Miguel de Icaza <miguel helixcode com>
- cc: otaylor redhat com, gnome-print helixcode com, gnome-devel-list gnome org
- Subject: [Gnome-print] Re: Gnome text subsystems
- Date: Fri, 2 Jun 2000 20:15:02 +0200 (CEST)
On 31 May 2000, Miguel de Icaza wrote:
> I think this design you have outlined is missing the "Font" that
> the user wants to use.
Hmmm... I thought GnomeFont to be exactly that.
IMHO font lib should intermediate between low-level (freetype) font
stuff and various levels of display libs (canvas, gnome-print, etc.)
Rendering options in gnome-font should in first case designed for
CanvasItems, PrintContexts etc. implementations. The latter are things,
user really wants to use.
I.e.
text = mytext
font = gnome_font_dialog_get_font (...)
layout = do_some_pango_layout_from_text_and_font (...)
item = gnome_canvas_para_text_new (parent, type, "font", font,
"text", text, NULL)
Accessing font objects manually is usually not necessary in user programs,
sodipodi- and achtung like things aside.
> I know Owen wants us to use X fonts, but I honestly think that the
> sooner we can ignore the existance of X fonts, the better. And if we
> can fully ignore them, all the better.
If you think of X fonts as separate resources. You can well take these as
simply easily accessible bitmap sets :) - which is sometimes convenient to
have.
What has to be ignored, is X font API - if we ever need X font, it should
be created/managed by gnome-font, which ensures that it is exactly what we
want it to be.
I.e. we get gnome-font, and ask it to find/generate X font set, which is
guaranteed to look like exactly the same as gnome-font, sent to printing
library.
> Because we wont be able to do any kind of WYSIWYG with X fonts, and
> hoping that we will do a good enough job at matching this font for
> printing.
>
> What I would like to see is a mechanism in which we could "upload"
> a rasterized font that we generated from a Type1/TrueType font.
Upload to where?
Aa canvas aside, there is currently no other way to get high-quality
dislay. If you manually render fonts to pixmaps, you still cannot use
antialiasing, plus you need extensive GC manipulation (masks), which
probably takes speed down.
I still think, using X fonts is the only way to get WP style things to
work reasonably fast with untransformed text. Using rotated, considerably
zoomed etc. fonts can well go via pixmap compositing, as usually there is
little such text.
Font system should be able to do on-demand rendering to X fonts,
consisting of glyphs actually used, and translating glyph lists to
resulting (weird?) encodings.
so possible API for fast text rendering would be something like:
1. font = gnome_font_fint (...)
2. layout = do_some_pango_layout_from_text_and_font (...)
3. xfontset = gnome_x_fontset_from_layout_and_font (...)
4. xlayout = translate_pango_layout_to_x (...)
5. render_x_layout (...)
Now 3-5 can be well handled via pango, given that there is well
established connection between gnome-fonts and pango-fonts, including
access to on-demand created fonts.
1-2 should be separated from 3-5, to give to user access to
device-independent layout - which is the same for printing, canvas and (in
given example) plain X rendering.
Regards,
Lauris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]