[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Qt postscript font bug ?
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2003-12-30 22:21:29
Message-ID: 200312302321.29151.neundorf () kde ! org
[Download RAW message or body]

Hi,

I have two ttf fonts, vandijkb.ttf and vandijkn.ttf, which I'd like to use, 
but I can't print them from kde apps.

The entry in fonts.dir looks like this:

vandijkb.ttf -misc-Van Dijk-bold-r-normal--0-0-0-0-p-0-iso10646-1
vandijkn.ttf -misc-Van Dijk-medium-r-normal--0-0-0-0-p-0-iso10646-1

The entries in /usr/share/ghostscript/7.05/lib/Fontmap.GS looks like this:

/Van-DijkITC-Bold    (/usr/X11/lib/X11/fonts/TTF2/vandijkb.ttf);
/Van-DijkITC-Normal    (/usr/X11/lib/X11/fonts/TTF2/vandijkn.ttf);

I can use the fonts e.g. in kpresenter to format the text, but the generated 
postscript file doesn't work.

This is the start of the generated postscript file:

%!PS-Adobe-1.0
%%BoundingBox: 0 0 595 841
%%Creator: Qt 3.2.1
%%Title:
%%CreationDate: Tue Dec 30 21:58:38 2003
%%Orientation: Portrait
%%Pages: 1
%%DocumentFonts: Van DijkITC-Normal

%%EndComments
%%BeginProlog

The problem seems to be the space between "Van" and "DijkITC" in the fontname.
If I replace this space with a "-" the ps file "works, i.e. I can print it.

So, is this a problem in Qt, or a problem with the font, which maybe shouldn't 
contain spaces, or something else ?
Can I work around this problem or has it to be fixed in Qt or is the font 
"broken" ?

Qt version is 3.2.1

The entries in FontMap.GS were created with the attached perl script (found in 
the fonts.howto)

Thanks
Alex
-- 
Work: alexander.neundorf@jenoptik.com - http://www.jenoptik-los.de
Home: neundorf@kde.org                - http://www.kde.org
      alex@neundorf.net               - http://www.neundorf.net

["ttfontmap" (application/x-perl)]

#!/usr/bin/perl
# ttfontmap -- generate fontmap file for TrueType fonts

my $directory=shift || print STDERR "Usage: ttfontmap {directory}\n";

$directory=~s/\/$//;

for my $fontname ( glob ( "$directory/*.ttf" ) )
{
    open ( R, "sh -c \"ttf2pt1 -A $fontname - 2>/dev/null\" |" );
    while ( <R> )
    {
        if ( $_ =~ /^FontName/ )
        {
            s/^FontName\s*//;
            chomp;
            print "/" .  $_ . "    ($fontname);\n" ;
        }
    }
    close R;
}


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic