[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Text rendering status
- From: Martin Wuerthner <lists@xxxxxxxxxxxxxxx>
- Date: Mon, 03 Apr 2006 12:33:04 +0200
- Subject: Re: [XaraXtreme-dev] Text rendering status
In message <442EAB83.5070302@xxxxxxxxxxx>
Alex Bligh <alex@xxxxxxxxxxx> wrote:
> Neil Howe wrote:
>> I've just checked in some test files for you to work with. Most if not
>> all of them contain text objects with a red bitmap copy of the text
>> positioned exactly behind. This makes it easy to see whether the text is
>> being rendered correctly, because it should fit exactly on top of the
>> bitmap copy.
>
> It's only going to fit on top of the original if it's rendered in
> the right font. Looking at the shape of the capital "S" it's
> a very different font. I guess this is what Martin meant by
> font substitution being a bit dumb at the moment.
I had a closer look at font mapping and you can do a lot globally
using fontconfig without having to have application-specific code. The
system-wide default file I found on my SUSE 10.0 system is not quite
adequate though. For instance, I do have metric-compatible fonts for
the Adobe standard fonts installed (provided by URW), but the default
fontconfig mapping maps the standard Windows names to some other fonts
by AMT that are not installed, which means that Times New Roman and
Arial are mapped to some default "serif" and "sans serif" fonts (SUSE
Sans and SUSE Serif, which look quite different).
After I added some personal mappings to my ~/.fonts.conf file I now
get exact horizontal matches with the test files (as long as
auto-kerning is off, see Kerning.xar). I guess, most Linux systems
have the URW fonts installed, which are PostScript fonts that have
been donated to the open source community many years ago.
The following lines added to .fonts.conf (between <fontconfig> and
</fontconfig>) did the trick:
<alias>
<family>Times New Roman</family>
<accept><family>Nimbus Roman No9 L</family></accept>
</alias>
<alias>
<family>Arial</family>
<accept><family>Nimbus Sans L</family></accept>
</alias>
<alias>
<family>Courier New</family>
<accept><family>Nimbus Mono L</family></accept>
</alias>
<alias>
<family>ZapfChan Md BT</family>
<accept><family>URW Chancery L</family></accept>
</alias>
<alias>
<family>AvantGarde Bk BT</family>
<accept><family>URW Gothic L</family></accept>
</alias>
Martin