Re: questions for a page layout program

Lauris Kaplinski wrote:
> First I want to say, I very much hope you layout program will take off
> soon. It would certainly be a very pleasant piece of code ;)
So do I!!!

> Have you looked at sodipodi internal document structure (sorry - it is not
> well documented outside source).
No.  I shall do so.
I do expect to use an M-V-C sort of approach, though.
The notes I put up on teh web are very disorganised, because I wanted
to get the ideas down so that I could discuss them with people.

I have no specific interest in the DOM -- it was designed for something
other than what I am doing, and is a compromise between Microsoft and
Netscape.  The main advantage of the DOM is that it is widespread, so
people are often familiar with it.  Of course, that's true of Visual
Basic and Windows Notepad too :=)

> Level 2 - typed tree. Here Tree 1 attributes and nodes are semantically
> interpreted and corresponding objects created (Rectangle for <rect>,
> Ellipse for <ellipse>)
Well, I'll be using a style sheet, and I won't have a 1:1 correspondance
between elements and styles, e.g. the first line of a paragraph being
rendered in blue, or automatic small-caps applied to text matching
a pattern like [:upper::digit:]{2,} or something.

I want to be able to export an annotated (formatted) XML stream as well
as the original (possibly edited) text.

> 2. Layout engine
> Have you tried, to more exactly describe the process, getting
> visible/printed output from unicode stream in you imagination.

I am not sure what you are asking here.  I don't have anything written
down in more detail yet, sorry.

> 3. Font metrics
> Even on >1 bit displays you cannot use font antialiasing for exact
> positioning, without heavy visual stress on glyph readability.
Right.  But have you tried using Quark Express?

Note also that the Microsoft Windows approach is to use TrueType fonts,
and allow line breaking to differ between screen and print -- hence
Word's "Print Preview" screen.  This is a fundamental difference
between TT and Type1 fonts of course.

> So the best I can imagine is to have 2 displaying modes:
> SPW (best picture for editing text)
> PPbit (real WYSIWYG, also editable)

Right, FreeHand has a separate text editor dialogue, since editing
text that's attached to a wavy path instead of straight baselines
(for example) is a nightmare.  It lets you do that too, though.

> Maybe the Right Way for future is:
> - Use GnomeFont as universal abstract font object, binding together
>   Pango/X/printer/canvas/whatever fonts
Pango isn't finished though.  And I absolutely need to distinguish
TT, Type 1 and bitmap (and other, e.g. Speedo) fonts in the Choose
Font dialogue box, because otherwise people might try and send a
bitmap, or a TrueType font, to a PostScript typesetter, not a good
idea.  I *do* want to generate PostScript separations and have the
typesetter's RIP do the font rendering, as that's the only sensible
way to give the print bureau enough control for hexachrome, etc.

> - Use (possibly derived) Pango layout engine, to generate glyph layout and
>   to translate input back to text level
Pango isn't finished though. :-)

> - Use (possibly derived) canvas text item, to display positioned glyphs
Right, or I had hoped to position whole blocks of text in a single item.

> - Use gnome-print to print positioned glyphs
I'm not sure about this one.

> One of the problem is, that for SPW display you positioned layout has to
> include both screen and printer positions.
Yes.  Actually even troff printer drivers have to keep track of
rounding errors; one that I wrote tried to move errors into wordspaces,
where they were generally unnoticeable at 1200 dpi or higher.

> > You can see a few design ideas at http://www.holoet/~liam/glayout/
ack, sorry

> Question: Have you thought, how should good font selecting / finding look
> like?
A lot.  I wrote a font chooser for X (open look ui) once.

> I am very unimpressed with standard fontname->bold/italic->size thing.
Well, of the 2,000 or so commercial type 1 fonts I own, a large
minority do not fit into the "four weights in a family" nonsense.

> Something like:
> I choose font class (latin renaissance, latin modern, latin decorative,
> arabic ???...)
> From class I choose family by name
> Family gives my primary attribute split (usually antique?/italic)
> Constraining goes on, until exact typeface is selected

Yes, I actually wrote something like that using tcl/tk + tix once, but
it was too slow (on my 14MHz Sun 4/110 at the time!) and I don't know if
I still have it.  Really, designers tend to want a pallette of fonts,
so they might spend time browsing/choosing fonts to put in the pallette,
and then choose fonts from that set for a particular job.

For example, you might use Monotype Bembo for text and FF Syntax for
headings, with side notes in Bembo Italic and picture captions in
8/10pt Syntax bold, reversed to white on black.  So your pallette
might include Bembo, Bembo Italic, Syntax and Syntax Bold.  But you
probaboy also want Bembo Expert, Bembo Italic Expert, and maybe you
prefer the "k" in Bembo Alternates and want to substitute that.

A set of default pallettes would make life easier for people less
familiar with fonts, but the whole idea of a page layout program
for the average user is like a C++ compiler for the average user --
you need to think about what "average" means rather carefully :-)

An experienced designer generally has two main uses for bold italics,
by the way -- retro 1950s advertising :-) and for italics when set
light on a dark background (they also should be letterspaced sightly).

Hence the word processor handling of BI is somewhat suspect, but it's
so ubiquitous now that you have to do it.  Control-B and Control-I
have to toggle bold & italic, although for emacs users' sanity I should
probably allow a set of alternate bindings.

It's looking like my best course is more design documents, and talking
to people, and maybe starting to think about frameworks, but that
it's too soon to rely on gnome's font support.

Best, and thanks for replying...


Liam Quin - Barefoot in Toronto - -
Ankh on
Co-author, The XML Specification Guide, Wiley, 1999
Forthcoming: The Open Source XML Database Toolkit

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