Re: Text Problem 0.90RC1

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?

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:

Since the size of text determines the size of boxes, it should only change
when there is an actual change in the text (font, font size, font style).
However, fonts in Gdk and Freetype do not scale linearly, so whether the
font displayed fits into the bounding box depends on the zoom factor.


(The latter two are with freetype)

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.


Lars Clausen (| 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?

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