RE: Text Problem 0.90RC1



Lars Clausen wrote:
On Tue, 14 May 2002, Robert Young wrote:
Just a quick problem I found. Place a piece of text on a 
diagram. Change
it's font. Move it about - it's bounds are not correct.
Compiled with no options i.e. Freetype OFF.

What fonts are you changing from and to, at what size and zoom?

New Diagram. New Text. At this point it is using Courier, size 0.8, and 100%
zoom. Change font to AvantGarde-Book and when the text is moved about it
leaves stuff behind - hence me thinking its a bounding box problem.
The bounding box, however, is OK at 141% and 200% zoom...

Any ideas where to look in the source. Tried lib/text.c and
obj/standard/objtext.c (from memory) but couldn't see where....

The place to look is font_string_width in lib/font.c.  The 
problem is this:

<Snip>

I am tempted to for all small sizes just render a larger size and then
scale in Dia, no matter the uglyness.  For now, there is a 
wiggle factor of
1.1, which leaves some extra room in some cases.  We may need 
to increase
it a bit.

I took a look at lib/font.c and see what you mean. I did, however, notice
that the problem  is only with this particular font face that it occurs.
Mind you, that is just for size 0.8, zoom 100%. Also, there was a message
appearing in the console when using AvantGarde-Book about this font
(-schumacher-clean-medium-r-normal ...) not supporting all characters in my
locale (en_AU) - then complains that it is missing character set ISO8859-1.
I'd probably blame it on this. Your fudge factor of 1.1 works pretty well
(>90% of the time).

I guess the next question is : what needs to be done to get Freetype working
well enough to replace GDK fonts?? Or is Freetype justa stepping stone to
Pango? Should I spend my lunch time playing with Freetype enabled, instead?

Regards,
Rob.




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