[Gnome-print] Re: Device independent string output
- From: Owen Taylor <otaylor redhat com>
- To: Lauris Kaplinski <lauris kaplinski com>
- Cc: gnome-devel-list gnome org, njh nudibranch csse monash edu au, liam holoweb net, miguel helixcode com, gnome-print helixcode com
- Subject: [Gnome-print] Re: Device independent string output
- Date: 22 Jun 2000 10:49:26 -0400
My main concerns with such a system would be:
- There is quite a bit of code in Pango that manipulates glyphstrings.
The most specific examples would be the routines that map from
screen position <=> character position.
These routines needs positioned glyphs, not a description as you propose
So, what you are proposing is adding another stage to the pipeline,
text => positioning description => glyph string
This will slow things down and complicate them. It may not be a major
slowdown, or a major complication especially if shapers can avoid having
to do metric lookups by relying on your "language", but it won't make
(My concern about speed is all about initial speed and total throughput.
Initial layout has to be fast, and making incremental changes fast
at the expense of initial speed is not a good tradeoff in my book.)
- Your language will lock Pango to a specific font technology. There
is no way such a language could support both, say, OpenType and
Quickdraw GX fonts.
Standardizing on OpenType (or font systems that can be emulated as
subsets of OpenType) may not be a bad thing - it's about as
complete as you would ever need, and seems to have the backing of
the necessary people to get wide acceptance.
- The result does need to be a "glyph string" even if it is
a highly annotated one. Hit testing, etc, require that the
mapping from glyphs to characters can be determined. Any language
should be purely declarative. (I don't see anyfintention on
your part to do anything else, but I thought I would mention that
I certainly wouldn't rule out such a method, though I'm a bit worried
about overhead and complexity. I'd probably have to see a bit more
details before forming a solid opinion on the matter.
Lauris Kaplinski <email@example.com> writes:
> I have thought about formatting device-independent output strings to be
> fed to gnome-print/gnome-canvas recently.
> Problem: We have laid out text (possibly for certain printer), which we
> want to output with maximum possible quality on given device (other
> printer, print preview, editable canvas, etc.), at the same time keeping
> all relevant layout. So how should the (logic of) layout look like?
> I propose following solution:
> Develop ultra-light glyph positioning language, capable of
> - specifying font, size and master resolution
> - specifying certain set of font subtypes, such as horisontal/versus
> vertical metric sets
> - specifying currentpoint positioning both absolute and relative terms
> - extracting certain set of portable metric information from font
> - trivial set of standard operators
> Such language is encoded together with glyph and font pointers into
> glyphlist like structures, which are sent to output.
> Little example - rendered string "A.T", using kerning, can look out
> something like (language syntax is arbitrary)
> (Helvetica 12 300 300) setfont
> 100 100 moveto
> (A) show
> (A.) kerning_adjust
> (.) show
> (T) show
] [Thread Prev