Discussion:
[Fwd: Re: [Dvipng] Possible problem with dvipng version 1.8/FT fonts]
Jan-Åke Larsson
2006-05-16 06:34:02 UTC
Permalink
Somehow this went off-list:

-------- Original Message --------
Subject: Re: [Dvipng] Possible problem with dvipng version 1.8/FT fonts
Date: Fri, 12 May 2006 15:25:55 +0200
There may be a problem with loading FT fonts in version 1.8 of dvipng. I
get the following error when running version 1.8
dvipng: Fatal error, cannot load FT char 78
(char 78 is evidently the first character in my dvi file 'N')
This is caused by the call to FT_Load_Glyp in ft.c
Version 1.7 compiles and runs successfully on my system.
How odd. The only thing that has changed is

--- dvipng/ft.c 2005/09/30 13:54:55 1.20
+++ dvipng/ft.c 2006/03/27 14:55:40 1.21
@@ -44,7 +44,7 @@
glyph_i = FT_Get_Char_Index( currentfont->face, c );
if (FT_Load_Glyph( currentfont->face, /* handle to face object */
glyph_i, /* glyph index */
- FT_LOAD_RENDER | FT_LOAD_NO_HINTING ))
+ FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT ))
/* load flags */
Fatal("cannot load FT char %d",c);
ptr->xOffset = -currentfont->face->glyph->bitmap_left*shrinkfactor;



If you want to test this, reverse that change and try again.
/JÅ
Jan-Åke Larsson
2006-05-16 06:34:43 UTC
Permalink
And this:

-------- Original Message --------
Subject: Re: [Dvipng] Possible problem with dvipng version 1.8/FT fonts
Date: Fri, 12 May 2006 15:06:46 +0100
From: William S. Harwin <***@reading.ac.uk>
To: Jan-Åke Larsson <***@mai.liu.se>
References: <***@reading.ac.uk> <***@mai.liu.se>


Thanks for the help, that seems to be the problem. If I copy the version
1.7 ft.c into the 1.8 directory and compile all works fine. The problem
seems to be buried deep in the FT libraries. I did have a go compiling
dvipng with -g so I could to use gbx, but I only see the address of
currentfont->face

Interestingly
47c47
< FT_LOAD_RENDER | FT_LOAD_NO_HINTING |
FT_LOAD_TARGET_LIGHT))
---
Post by Jan-Åke Larsson
FT_LOAD_RENDER | FT_LOAD_NO_HINTING ))
doesn't work either so I guess a short term fix would be to try the
version 1.8 load flags and if that fails try the 1.7 load flags!

William
Jan-Åke Larsson
2006-05-16 07:38:06 UTC
Permalink
How about the following invocation:

if (FT_Load_Glyph( currentfont->face, glyph_i,
FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT )
&& FT_Load_Glyph( currentfont->face, glyph_i,
FT_LOAD_RENDER | FT_LOAD_NO_HINTING ))
Fatal("cannot load FT char %d",c);

/JÅ
--
"We just typed make"
Stephen Lambrigh, Director of Server Product Marketing at Informix
about porting their Database to Linux
Jan-Åke Larsson
2006-05-16 07:49:05 UTC
Permalink
I am beginning to suspect a version conflict between the freetype
version used for compilation and the version used runtime.

What is the output of

dvipng -d32 test.dvi | grep VERSION

/JÅ
--
Cats humour us because they know that their ancestors ate ours
Jan-Åke Larsson
2006-05-16 09:07:57 UTC
Permalink
Response from William as follows. William, can you do the same on the
CentOS machine? I'd like to know if this is a Freetype-version thing.


-------- Original Message --------
Subject: Re: [Dvipng] Possible problem with dvipng version 1.8/FT fonts
Date: Tue, 16 May 2006 09:56:31 +0100
From: William S. Harwin <***@reading.ac.uk>
To: Jan-Åke Larsson <***@mai.liu.se>
References: <***@mai.liu.se> <***@mai.liu.se>
<***@mai.liu.se>

The patch works fine.

I should add that dvipng version 1.8 compiles and runs without problem
on my Centos laptop. The problem machine is running fedora 2 (which I
plan on upgrading sometime in the summer)

I get the following output from your test

# dvipng -d32 test_dvipng.dvi | grep VERSION
LIBFT VERSION: 2.1.7
FREETYPE VERSION: 2.1.7
dvipng warning: at (86,73) unimplemented \special{fail}

--
Thanks for your help

William
Jan-Åke Larsson
2006-05-16 11:26:59 UTC
Permalink
And here is the response. OK, seems the thing is fixed somewhere between
2.1.7 and 2.1.9. I'll do some testing myself but it seems I'll have to
live with that extra invocation

/JÅ


-------- Original Message --------
Subject: Re: [Fwd: Re: [Dvipng] Possible problem with dvipng version
1.8/FT fonts]
Date: Tue, 16 May 2006 12:20:20 +0100
From: William S. Harwin <***@reading.ac.uk>
To: Jan-Åke Larsson <***@mai.liu.se>
References: <***@mai.liu.se>

Looks like a version problem, the centos machine has the following
output to your command.

LIBFT VERSION: 2.1.9
FREETYPE VERSION: 2.1.9

Loading...