RE: Commit: Re: notes on smart quote implementation (fwd)


Subject: RE: Commit: Re: notes on smart quote implementation (fwd)
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu Aug 24 2000 - 09:22:22 CDT


On Thu, 24 Aug 2000, Dom Lachowicz wrote:

> Martin Sevior said:
> >
> >I don't know how much work this is but as a side effect it might buy us
> >genuine anti-aliased fonts on X too.
>
> Martin,
>
> This is what I currently want to do. Kind of...
>
> I'm just concerned about 1 thing: I write an Abi document on Linux/Gtk. I
> send it to my friend who's using the Gnome build. The fonts used in the Gtk
> build don't correspond to fonts in Gnome (take our "Times New Roman" versus
> their "Times"). Do I:
>
> 1) fall back to a default font ("Times" or "Courier") that I know will be
> there? I don't like this much.
> 2) copy all of our Unix fonts to the Gnome-Print font directory on install
> and append them to fonts.dir? This seems ugly to me but is the most-complete
> solution that I can think of.
> 3) not do anything (kind of what you're suggesting) and let printing (for
> now, but later also rendering to the screen) segfault Abiword because
> gnome_font_new_closest() can't find my font family? This'd get *me* upset
> enough to try to fix the unixfont mess.
> 4) Some function to do "fuzzy" matching on font names (maybe using strstr),
> and match a "Times New Roman" -> "Times". This is better than #1 but we
> might still need to fall back on default fonts.
> 5) Something else???

Actually 2 is the best solution followed by 1. For 2 though just duplicate
our names in their fonts.dir and guess the font set that comes closest. I
bet their is a one to one mapping of the fonts available in abi and those
in gnome. There just aren't that many good free Type 1 font sets. Make
sure that the "symbol" and "dingbat" font names are defined otherwise
"insert symbols" and "Lists" will fail.

If you can't find a font name fall back to a default. I thought for a
while to do "fuzzy" matching ala 4 too. It might be an interesting hack to
work out an algorithim to match via similar names. eg Try breaking into
words do strstr on words in font names and vice versa. Make a scoring
sheet and choose the best score... Fun, but time consuming :-)

>
> You're right. I think that if we use the gnome-font package and then the
> anti-aliased GnomeCanvas, we'll get tremendous screen output(like how the
> gnumeric-heads brag that recent Gnumeric builds render better than Excel).
> But how do I do this and not break stuff?
>

There is a one-to-one correspondance between abi's xp drawing code and
canvas primitives. We just need to sub-class the unix drawing code with
wrappers around canvas drawing codes. It's actually not much code. Then
everytime we create a drawing area in unix we override in a child class an
canvas intialization. We can do this for the dialogs too. However the
dialogs don't have to be changed all at once.

Regarding the anti-aliased canvas aren't there performance issues for
heaving drawing work? We draw a LOT in abi. Probabally too much. Once we
get to 0.90 it might be worth while to see if can cut down on re-draws.

> I'm interested in hearing people's opinions and suggestions because I'm
> really stumped. Unix fonts suck. I'll try getting this working ASAP but
> don't hold back 0.7.11 on my account. This'll definitely get in before 0.9.0

Is there an update on the 0.7.11 release?

> Dom
> non-antialiased fonts hurt my eyes...

They sure look better. I love the xdvi latex previewer.

Martin



This archive was generated by hypermail 2b25 : Thu Aug 24 2000 - 09:22:39 CDT