Font sizing (was Re: [dia] Windows created diagrams are no longer readable)
From: Hans Breuer <Hans Breuer org>
To: dia-list gnome org
Subject: Font sizing (was Re: [dia] Windows created diagrams are no longer readable)
Date: Mon, 17 May 2004 15:19:46 +0200
At 14:14 14.05.04, Lars Clausen wrote:
On Thu, 2004-05-13 at 22:15, Federico Maggi wrote:
> hi,
> I am sorry if some similar post already exists.
>
There were many posts, but none of them had such a misleading subject yet ;)
[For me "are no longer readable" sounds like a much more serious problem
than just some size mismatch.]
> I am using the same dia version (0.92.2) both on Windows (XP) and Linux
> (GNU/Linux, debian/testing).
Once the Windows version of it comes out, try 0.93, it uses font-config,
so may agree more on fonts.
even if there would be a font-config based build it wont solve the problem
which is (part of, but also read below) :
_different fonts_ provide by any system will generate different sized
bounding boxes. There is no magic in Pango or font-config to resolve this
issue long time known in Dia land.
Note: this is not a matter of the platform you are running Dia on but a
matter of concrete font files. Ensure they are the same, and appropriately
mapped/named in you font configuation and the problem is gone.
By default Dia currently uses very weak hints to the font system which font
to use, like 'sans', 'serif', 'monospace' - that is : the first font in the
systems enumeration which is classified as being of the respective type.
Depending on your system for e.g. sans-serif this may be :
'Helvetica - on common Linux (if there is such)
'Luxi Sans' - with osx/X11
'Arial' - with win32 (either Pango/FT2 or Pango/win32 based)
> If I create a diagram with Windows Version and then go open it with Linux
> Version I see a 'crazy situation': all the anchor points are scrambled.
>
you should be able to reduce (if not eliminate) the issue by having the
same font files installed on both systems _and_ explicit select the desired
font in Dias font properties.
> I just need to point-n-click every anchor to solve this problem but it
is a
> very long-and-boring job!
You can Ctrl+A to select all, and then just move it back and forth a
bit, that should resolve most of it.
It is, however, a problematic issue. Problem is that Win32 and Pango
don't agree on how to render fonts, so they have slightly different
widths, which in turn determines the size of the boxes. Haven't found a
good solution yet.
Sorry Lars - but I've a different understanding of the problem. I've tried
Dia on win32 with both backends Pango/win32 and default
font-config/Pango/FT2 and beside marginal different aliasing the sizes were
exactly the same.
Also aren't you comparing apples to elephants (Pango and Win32)? Shouldn't
that read FT2 and win32 font rendering ? Or did you mean font-configs font
list compared to the one provided by win32::EnumFontFamilies() ?
UPDATE: Repeating my test with 0.93 (they were originally done some month
ago with some 0.92 or even 0.91 ?) did show a IMO serious regression
though. Font sizes between the backends are no longer the same.
To test yourself try the attached UML-Test (original from Dias
distribution, I've put in an additional layer showing the UML Class box
sizes with Dia-0.90-win32.
Loading the file with 0.93(Pango/win32) shows some small deviation, some
few percent as expected. But loading the same file into .93(Pango/FT2)
shows that the boxes - and thus the reported text length - are about 30%
smaller. To me this looks like an unacceptable regression - I simply have
too much diagrams done with 0.90 ...