[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Confusion with MIRP
From: |
David Turner |
Subject: |
Re: [Devel] Confusion with MIRP |
Date: |
Sun, 06 Jan 2002 11:30:42 +0100 |
Hi George,
George Williams a écrit :
>
> FreeType is instructing one of my (generated) fonts in a fashion which I
> find unexpected.
>
> I don't know if this is a bug in freetype, or merely ignorance on my part.
> The code in question is ttinterp.c: 5601-5613 in Ins_MIRP
> /* minimum distance test */
> if ( ( CUR.opcode & 8 ) != 0 ) {
> if ( org_dist >= 0 ) {
> if ( distance < CUR.GS.minimum_distance )
> distance = CUR.GS.minimum_distance;
> } else {
> if ( distance > -CUR.GS.minimum_distance )
> distance = -CUR.GS.minimum_distance;
> }
> }
>
> In the case I am looking at I have autoflip turned off,
> distance = 88
> org_dist = -84
> cur_dist = -66
> GS.minimum_distance = 64
> After this code section has executed
> distance = -64
>
> I had expected distance to remain at 88.
> 1) distance is bigger than the minimum_distance so I assumed it should not
> be set.
> 2) the sign has been flipped even though autoflip is off.
>
> Why is org_dist used to determine the sign?
>
I can't tell you for sure for now, but some of the things
the interpreter does were necessary to be able to render
correctly the Microsoft fonts (they contain many
undocumented features that I had to "guess" through
hard trial and error)..
It may be that the code in question is a result of such
"experimentation", and part of _undocumented_ interpreter
behaviour..
Have you tried your font on a Windows system to see what
the rendering was ? This should help a lot..
Cheers,
- David