[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] FIX? [was: Non-integer bbox for T1 font?]
From: |
Tom Kacvinsky |
Subject: |
Re: [Devel] FIX? [was: Non-integer bbox for T1 font?] |
Date: |
Tue, 6 Mar 2001 16:59:11 -0500 (EST) |
The FontBBox is is set up to take 16.16 fixed values. However, the code (w/o my
patch) was taking in 16 bit shorts. This is because T1_ToCoordArray typescasts
(resulting in a demotion -- ugh!) the results of t1_tofixed to a 16 bit short.
Changing the code to use T1_ToFixedArray bypasses this typecast and uses the
full 16.16 fixed numbers returned by t1_tofixed. So that is the fix, I think.
As an aside:
I think that if T1_ToCoordArray is going to fill in arrays of 16 bit shorts, the
code where the assignment is made should take the results of t1_tofixed, shift
right 16 bits, and with 0xFFFF, cast the result to a 16 bit short and then make
the assignment...
But I need to investigate more and see exactly how T1_ToCoordArray is used.
On Tue, 6 Mar 2001, Werner LEMBERG wrote:
>
> > Attached is patch fro t1load.c that places 16.16 fixed numbers (16
> > bits of integer, 16 bits of fraction) into the font bbox array. To
> > get the integer part in your code, just shift right 16 bits. There
> > will be some rounding errors (rounding up/down when it should be
> > vice versa), but i imagine you can get around that...
> >
> > Let me know if that fixes your problem. I would appreciate comments
> > from others as well.
>
> You say that non-integer bboxes are valid, so I think it would be a
> good idea to have that in FreeType also... Feel free to fix that :-)
>
- [Devel] [slightly-OT] Non-integer bbox for T1 font?, Leonard Rosenthol, 2001/03/05
- Re: [Devel] [slightly-OT] Non-integer bbox for T1 font?, Tom Kacvinsky, 2001/03/05
- Re: [Devel] [slightly-OT] Non-integer bbox for T1 font?, Leonard Rosenthol, 2001/03/05
- Re: [Devel] [slightly-OT] Non-integer bbox for T1 font?, Tom Kacvinsky, 2001/03/06
- Re: [Devel] [slightly-OT] Non-integer bbox for T1 font?, Leonard Rosenthol, 2001/03/06
- Re: [Devel] [slightly-OT] Non-integer bbox for T1 font?, Tom Kacvinsky, 2001/03/06
- [Devel] FIX? [was: Non-integer bbox for T1 font?], Tom Kacvinsky, 2001/03/06
- Re: [Devel] FIX? [was: Non-integer bbox for T1 font?], Leonard Rosenthol, 2001/03/06
- Re: [Devel] FIX? [was: Non-integer bbox for T1 font?], Werner LEMBERG, 2001/03/06
- Re: [Devel] FIX? [was: Non-integer bbox for T1 font?],
Tom Kacvinsky <=
- Re: [Devel] FIX? [was: Non-integer bbox for T1 font?], Tom Kacvinsky, 2001/03/06
- Re: [Devel] FIX? [was: Non-integer bbox for T1 font?], Werner LEMBERG, 2001/03/07
- Re: [Devel] FIX? [was: Non-integer bbox for T1 font?], Tom Kacvinsky, 2001/03/07
- Re: [Devel] FIX? [was: Non-integer bbox for T1 font?], Tom Kacvinsky, 2001/03/07