Font scaling [Was: XML file format - Linux vs Windows]
From: Lars Clausen <lrclause cs uiuc edu>
To: dia-list gnome org
Subject: Font scaling [Was: XML file format - Linux vs Windows]
Date: 19 Jun 2002 13:20:34 -0500
On Wed, 19 Jun 2002, Ian Britten wrote:
> On Tue, 18 Jun 2002, Lars Clausen wrote:
>> On Tue, 18 Jun 2002, Ian Britten wrote:
>> > I don't want to talk about fonts... :-< (Courier seems to work ok :-/)
>>
>> Fonts are a sore spot indeed. We're going to see what using Pango gives
>> us. If we don't get consistent scaling there, we shall have to do
>> scaling by hand, even if small fonts will look uglier.
>
> [ Me again... Please CC me if possible ]
>
> Have you looked at Freetype2? I think it more directly deals with your
> problem then Pango would (which seems to have lots more than just font
> rendering in it).
We have, and I did in fact make a renderer that uses it. If you take the
0.90 tarball and compile with --enable-freetype, you can see pretty
antialiased TrueType fonts. However, I failed to get even that to scale
linearly. I've tried without hinting and bitmaps, but the scaling is still
odd. An example diagram is at
<URL:http://shasta.cs.uiuc.edu/~lrclause/Dia/BrownFox.dia>
and a screenshot of the freetype/libart display at
<URL:http://shasta.cs.uiuc.edu/~lrclause/Dia/BrownFox-freetype.png>
The purple boxes are the bounding boxes, which scale linearly.
> Just my $0.02
> (I'll happily answer any questions anyone has - It'd be a small price
> to pay for your great program!)
If you want to fiddle with it, look in lib/font.c and and
app/render_libart.c. I'm running out of ideas for what to do.
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor
"I do not agree with a word that you say, but I |----------------------------
will defend to the death your right to say it." | Where are we going, and
--Evelyn Beatrice Hall paraphrasing Voltaire | what's with the handbasket?