freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] problem with PostScript names


From: Jacob (=Jouk) Jansen
Subject: Re: [Devel] problem with PostScript names
Date: Thu, 18 Oct 2001 08:22:01 +0200 (MET DST)

David wrote (or better a écrit ) on 17-OCT-2001 16:47:33.98
>"Jacob (=Jouk) Jansen" a écrit :
>> 
>> Hi all,
>> 
>> With freetype2 from the current CVS I get some problems with the psnames.
>> For roman and greek letters it is OK. However, the ps-names of 0,1,2,3,4,5,
>> !,#.$,%,&,',(,-,*,_,,,/, are assigned to something else. They them selves
>> get another ps-name.
>> I tested this with just a standard times.ttf file.
>> 
>> Previous versions worked OK.
>>
>I've just tried it on my machine with times.ttf, and FT_Get_Glyph_Name
>seems to work OK. Are you sure you're completely up-to-date ? maybe
>you caught an interim commit ??
The CVS of 16.00 MET yesterday had the same problem.

>Some internals have changed recently regarding the Postscript names
>storage within the library, but you should not see any difference
>unless you access internal tables directly (which is _bad_ anyway :-)

I attached to this mail a small test program.
I linked with both with freetype2.04 and freetrypeCVS_yesterday. Running
produced output on standard output which was captured in OLD.LIST and NEW.LIST
respectively. A diffrence of these files are attached to this mail. The
problem is clear. i.e. With the current CVS glyph no. 250 is wrongly called
"one". (Glyph 20 is also called "one" which is correct in both 2.04 and CVS)

I hope you can solve this problem.


                   Jouk





>------------------------test program start-----------------------------<
# include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <math.h>

#include <freetype/freetype.h>

main()
{
   FT_Library  font_library;
   FT_Face font_face;
   FT_Matrix matrix;
   FT_Bitmap bitmap;
   FT_GlyphSlot  cur_glyph;
   FT_Glyph_Metrics glyph_metrics;
   int glyph_ind;
   int num_chars;
   char char_name[256];

     
   if ( FT_Init_FreeType( &font_library ) )
     exit;
   
   if ( FT_New_Face( font_library , "times.ttf" , 0 , &font_face ) )
     exit;
   if ( FT_Set_Char_Size( font_face , 0 , 768 , 300 , 300 ) )
     exit;
   num_chars = (int) font_face->num_glyphs;
   FT_Set_Transform( font_face , NULL , NULL );

   for ( glyph_ind = 0 ; glyph_ind < num_chars; glyph_ind++ )
     {
        if ( FT_Load_Glyph( font_face , glyph_ind , FT_LOAD_DEFAULT ) )
          exit;
        cur_glyph = font_face->glyph;
        if ( cur_glyph->format != ft_glyph_format_bitmap )
          if ( FT_Render_Glyph( font_face->glyph , ft_render_mode_mono ) )
            exit;
        if ( FT_Get_Glyph_Name( font_face , glyph_ind , char_name , 16 ) )
          exit;
        bitmap = cur_glyph->bitmap;
        glyph_metrics = cur_glyph->metrics;
        printf( "Glyph %d  name %s %d %d %d %d %d\n" , glyph_ind , char_name ,
                glyph_metrics.horiBearingX / 64 ,
                glyph_metrics.horiBearingY / 64 ,
                glyph_metrics.horiAdvance / 64 ,
                bitmap.width , bitmap.rows );
     }
}
>------------------------test program end-----------------------------<



>------------------------Output difference start-----------------------------<
************
File $DISK3:[JOUKJ.TEST]OLD.LIST;2
  144   Glyph 143  name notequal 1 32 28 27 39
  145   Glyph 144  name AE -1 33 44 44 33
  146   Glyph 145  name Oslash 2 34 36 33 35
  147   Glyph 146  name infinity 1 23 36 34 21
  148   Glyph 147  name plusminus 0 28 27 26 25
  149   Glyph 148  name lessequal 1 30 28 27 34
  150   Glyph 149  name greaterequal 1 30 28 27 34
  151   Glyph 150  name yen 0 33 24 25 33
  152   Glyph 151  name mu1 3 22 28 23 33
  153   Glyph 152  name partialdiff 2 35 24 22 36
  154   Glyph 153  name summation 1 33 36 34 44
  155   Glyph 154  name product 1 35 41 39 46
  156   Glyph 155  name pi1 2 22 27 23 23
  157   Glyph 156  name integral 0 46 14 14 51
  158   Glyph 157  name ordfeminine 0 34 15 15 15
******
File $DISK3:[JOUKJ.TEST]NEW.LIST;2
  144   Glyph 143  name nonmarkingretur 1 32 28 27 39
  145   Glyph 144  name AE -1 33 44 44 33
  146   Glyph 145  name Oslash 2 34 36 33 35
  147   Glyph 146  name nonbreakingspac 1 23 36 34 21
  148   Glyph 147  name plusminus 0 28 27 26 25
  149   Glyph 148  name apple 1 30 28 27 34
  150   Glyph 149  name .notdef 1 30 28 27 34
  151   Glyph 150  name yen 0 33 24 25 33
  152   Glyph 151  name mu1 3 22 28 23 33
  153   Glyph 152  name space 2 35 24 22 36
  154   Glyph 153  name exclam 1 33 36 34 44
  155   Glyph 154  name quotedbl 1 35 41 39 46
  156   Glyph 155  name pi1 2 22 27 23 23
  157   Glyph 156  name dollar 0 46 14 14 51
  158   Glyph 157  name ordfeminine 0 34 15 15 15
************
************
File $DISK3:[JOUKJ.TEST]OLD.LIST;2
  166   Glyph 165  name radical 2 46 27 25 48
  167   Glyph 166  name florin 0 33 25 25 44
  168   Glyph 167  name approxequal 1 25 28 26 18
  169   Glyph 168  name Delta 1 33 31 29 33
  170   Glyph 169  name guillemotleft 2 23 26 22 23
******
File $DISK3:[JOUKJ.TEST]NEW.LIST;2
  166   Glyph 165  name ampersand 2 46 27 25 48
  167   Glyph 166  name florin 0 33 25 25 44
  168   Glyph 167  name quoteright 1 25 28 26 18
  169   Glyph 168  name parenleft 1 33 31 29 33
  170   Glyph 169  name guillemotleft 2 23 26 22 23
************
************
File $DISK3:[JOUKJ.TEST]OLD.LIST;2
  185   Glyph 184  name lozenge 1 34 24 22 34
  186   Glyph 185  name ydieresis 0 32 24 24 43
******
File $DISK3:[JOUKJ.TEST]NEW.LIST;2
  185   Glyph 184  name asterisk 1 34 24 22 34
  186   Glyph 185  name ydieresis 0 32 24 24 43
************
************
File $DISK3:[JOUKJ.TEST]OLD.LIST;2
  246   Glyph 245  name franc 1 33 24 21 33
  247   Glyph 246  name Gbreve 2 43 36 34 44
  248   Glyph 247  name gbreve 1 32 24 23 43
  249   Glyph 248  name Idot 1 41 15 13 41
  250   Glyph 249  name Scedilla 2 36 27 23 46
  251   Glyph 250  name scedilla 3 23 20 15 33
  252   Glyph 251  name Cacute 2 44 34 30 45
  253   Glyph 252  name cacute 2 34 23 19 35
  254   Glyph 253  name Ccaron 2 44 34 30 45
  255   Glyph 254  name ccaron 2 34 23 19 35
  256   Glyph 255  name dmacron 1 34 25 24 35
******
File $DISK3:[JOUKJ.TEST]NEW.LIST;2
  246   Glyph 245  name comma 1 33 24 21 33
  247   Glyph 246  name hyphen 2 43 36 34 44
  248   Glyph 247  name period 1 32 24 23 43
  249   Glyph 248  name slash 1 41 15 13 41
  250   Glyph 249  name zero 2 36 27 23 46
  251   Glyph 250  name one 3 23 20 15 33
  252   Glyph 251  name two 2 44 34 30 45
  253   Glyph 252  name three 2 34 23 19 35
  254   Glyph 253  name four 2 44 34 30 45
  255   Glyph 254  name five 2 34 23 19 35
  256   Glyph 255  name dmacron 1 34 25 24 35
************
************
File $DISK3:[JOUKJ.TEST]OLD.LIST;2
  526   Glyph 525  name Omega 1 33 36 34 33
  527   Glyph 526  name Iotadieresis 1 41 16 14 41
******
File $DISK3:[JOUKJ.TEST]NEW.LIST;2
  526   Glyph 525  name percent 1 33 36 34 33
  527   Glyph 526  name Iotadieresis 1 41 16 14 41
************
************
File $DISK3:[JOUKJ.TEST]OLD.LIST;2
  653   Glyph 652  name pi 0 22 25 24 23
  654   Glyph 653  name smiggring 0 34 50 46 27
******
File $DISK3:[JOUKJ.TEST]NEW.LIST;2
  653   Glyph 652  name numbersign 0 22 25 24 23
  654   Glyph 653  name smiggring 0 34 50 46 27
************

Number of difference sections found: 6
Number of difference records found: 31

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=$DISK3:[JOUKJ.TEST]DIFF.LIST;2-
    $DISK3:[JOUKJ.TEST]OLD.LIST;2-
    $DISK3:[JOUKJ.TEST]NEW.LIST;2
>------------------------Output difference end-----------------------------<


Bush : All votes are equal but some votes are more equal than others.

>------------------------------------------------------------------------------<

  Jouk Jansen
                 
  address@hidden

  Technische Universiteit Delft        tttttttttt  uu     uu  ddddddd
  Nationaal centrum voor HREM          tttttttttt  uu     uu  dd    dd
  Rotterdamseweg 137                       tt      uu     uu  dd     dd
  2628 AL Delft                            tt      uu     uu  dd     dd
  Nederland                                tt      uu     uu  dd    dd
  tel. 31-15-2782272                       tt       uuuuuuu   ddddddd

>------------------------------------------------------------------------------<




reply via email to

[Prev in Thread] Current Thread [Next in Thread]