Re: [gnome-print] Serializing a PangoFont
- From: Chema Celorio <chema ximian com>
- To: Owen Taylor <otaylor redhat com>
- Cc: gnome-print ximian com, keithp keithp com
- Subject: Re: [gnome-print] Serializing a PangoFont
- Date: 08 Jul 2002 16:05:03 -0500
On Mon, 2002-07-08 at 14:12, Owen Taylor wrote:
>
> [ I'm phrasing this reply in terms of Pango HEAD and fontconfig,
> since that's what any development targetted beyond the next
> few months will need to deal with. I've also CC'ed Keith Packard
> in case he has any relevant thoughts ]
<nod> I was looking at pango head too.
> But what is relevant really depends on what the metafile is going
> to be used for and how long it will be stored.
>
> - Do you want the exact same font file on disk?
Yes. This is what i want.
> - Do you want a font with exactly the same name and an error
> if it doesn't exist?
> - Do you want the closest matching font?
> - Do you want the font that would have been loaded if the
> same PangoFontDescription
>
> If you want close to pixel-for-pixel results, and you want to
> transport a metafile file between computers, then the only real
> way you are going to do that is by embedding the font information
> inside your file.
I am unsure of the long term usage of the metafile but since everything
is working fine as it is I don't want to touch that code right now. So
about sharing a metafile between computers, not for the visible future.
It is just an intermediate format for now which will go away if i ever
find a reason to do so (i.e. performance hit)
> > The only viable alternative that i see right now is getting a
> > PangoFontDescription from the font and when playing back the stream
> > create a font from a description, however this is currently not possible
> > unless i create a PangoLayout again, but i already know the layout I
> > have the glyph and the position.
>
> pango_context_load_font (context, pango_font_describe(font))
>
> Should give you a font that's reasonably similar to the original font.
> (Unless the font is missing, in which case it will give you a
> "random" other font without any indication of error; one of the
> deficiencies of FontConfig.)
>
> Note, however, that there is no guarantee at all that the glyph indices in
> the new font will correspond to the original glyph indices in the
> PangoGlyphString.
Right, this was happening to me before.
> (Even if the filename is the same, there is no guarantee; a new version
> of the font could rearrange the glyphs.)
>
> Really, unless you are sure that you are going to have *exactly* the
> same font, you need to redo the layout
Yes, I am sure we are going to have the exactly same font. It will be
ran on the same box immediately after the user prints.
thanks,
Chema
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]