freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [GSoC] CID font support, and others


From: Werner LEMBERG
Subject: Re: [ft-devel] [GSoC] CID font support, and others
Date: Fri, 28 Jul 2017 09:47:24 +0200 (CEST)

> You might (or might not?) have noticed, I've pushed all changes into
> `ewaldhew-cleaned' a few days ago.

I noticed, thanks, but I'm still on vacation, so it will take some
time until I can comment on more details.

> I've been comparing the charstrings and hinter movements, but the
> lack of visualization makes this tedious.  Nothing stands out as
> being the culprit, and each time I find a possible cause, I'd find
> the same pattern in some other glyph that renders fine.

I suggest that you add tracing messages.  For example, the attached
excerpt from a log file shows what the auto-hinter emits for glyph
index 2 of the font `c059013l.pfb' (URW Century Schoolbook L Roman
version 1.06).  I called

  FT2_DEBUG=any:7 ftview 20 c059013l.pfb &> c059013l.log

then pressing key `f' to enforce full auto-hinting.

As you can see, it is quite detailed.

In general, more tracing data is always a good thing; it might also
help later developers follow your changes (and earlier ones) step by
step.

> Besides this issue, I'm also meaning to look into the issue of slow
> CFF loading (bug #43248) mentioned by Alexei at the start. Not sure
> where to start, so I'd be glad for any advice.

A starting point might be running ftbench with a profiler.  I
sometimes use valgrind for that:

  valgrind --tool=callgrind ...

The resulting data can then be visualized with `kcachegrind'.  There
are certainly other profiling tools that you might find helpful.

> For now, this is what I'll be doing for this final phase.  Of
> course, there's also fixing up all the documentation, and more bugs
> may yet rear their ugly head...

:-)


    Werner
T1_Load_Glyph: glyph index 2

Start charstring
 (0) 87 296 hsbw
 (0) -14 125 hstem
 (0) 716 20 hstem
 (0) 82 191 rmoveto
 (0) 1 176 4 50 19 94 rrcurveto
 (0) 14 70 4 31 0 29 rrcurveto
 (0) 64 -20 31 -41 vhcurveto
 (0) -41 -21 -32 -62 hvcurveto
 (0) 0 -30 4 -31 14 -70 rrcurveto
 (0) 19 -94 3 -47 2 -179 rrcurveto
 (0) closepath
 (0) 20 -80 rmoveto
 (0) -35 -28 -28 -34 hvcurveto
 (0) -35 28 -28 34 vhcurveto
 (0) 35 28 28 35 hvcurveto
 (0) 34 -28 28 -34 vhcurveto
 (0) closepath
 (0) endchar

  x advance: 296
  y advance: 0
  linear x advance: 296
  linear y advance: 0
latin vertical edge hinting (style `latn_dflt')
  ANCHOR: edge 0 (opos=1.77) and 3 (opos=4.22) snapped to 2.00 and 4.22
  LINK: edge 3 (opos=4.22) linked to 4.09, dist was 2.45, now 2.09
  STEM: edge 1 (opos=2.55) linked to 2 (opos=3.38) snapped to 3.00 and 4.00
  ADJUST: edge 3 (pos=4.09) moved to 4.09

latin horizontal edge hinting (style `latn_dflt')
  BLUE_ANCHOR: edge 0 (opos=-0.30) snapped to 0.00, was -0.30 (anchor=edge 0)
  LINK: edge 1 (opos=2.31) linked to 2.84, dist was 2.61, now 2.84
  BLUE: edge 3 (opos=15.30) snapped to 15.00, was 15.30
  SERIF_LINK1: edge 2 (opos=3.97) snapped to 4.39 from 1 (opos=2.31)

Table of points:
  index  hedge  hseg  vedge  vseg  flags   xorg  yorg  xscale  yscale   xfit    
yfit
      0      2     1      2     0  strong   169   191    3.38    3.97    4.00   
 4.39
      1     --    --      2     0   weak    170   367    3.41    7.62    4.00   
 7.81
      2     --    --     --    --   weak    174   417    3.48    8.67    4.02   
 8.80
      3     --    --     --    --   weak    193   511    3.86   10.62    4.05   
10.62
      4     --    --     --    --   weak    207   581    4.14   12.08    4.08   
11.98
      5     --    --      3     1   weak    211   612    4.22   12.72    4.09   
12.58
      6     --    --      3     1   weak    211   641    4.22   13.31    4.09   
13.14
      7     --    --      3     1   weak    211   705    4.22   14.66    4.09   
14.41
      8      3     0     --    --   weak    191   736    3.81   15.30    3.75   
15.00
      9      3     0     --    --   weak    150   736    3.00   15.30    3.05   
15.00
     10      3     0     --    --   weak    109   736    2.19   15.30    2.36   
15.00
     11     --    --      0     2   weak     88   704    1.77   14.62    2.00   
14.38
     12     --    --      0     2   weak     88   642    1.77   13.34    2.00   
13.17
     13     --    --      0     2   weak     88   612    1.77   12.72    2.00   
12.58
     14     --    --     --    --   weak     92   581    1.84   12.08    2.11   
11.98
     15     --    --     --    --   weak    106   511    2.12   10.62    2.48   
10.62
     16     --    --      1     3   weak    125   417    2.50    8.67    3.00   
 8.80
     17     --    --      1     3   weak    128   370    2.56    7.69    3.00   
 7.88
     18      2     1      1     3  strong   130   191    2.59    3.97    3.00   
 4.39

     19      1     2     --    --   weak    150   111    3.00    2.31    3.06   
 2.84
     20      1     2     --    --   weak    115   111    2.30    2.31    2.47   
 2.84
     21     --    --      0     4   weak     87    83    1.73    1.72    2.00   
 2.20
     22     --    --      0     4   weak     87    49    1.73    1.02    2.00   
 1.44
     23     --    --      0     4   weak     87    14    1.73    0.30    2.00   
 0.64
     24      0     3     --    --   weak    115   -14    2.30   -0.30    2.47   
 0.00
     25      0     3     --    --   weak    149   -14    2.98   -0.30    3.05   
 0.00
     26      0     3     --    --   weak    184   -14    3.69   -0.30    3.64   
 0.00
     27     --    --      3     5   weak    212    14    4.23    0.30    4.09   
 0.64
     28     --    --      3     5   weak    212    49    4.23    1.02    4.09   
 1.44
     29     --    --      3     5   weak    212    83    4.23    1.72    4.09   
 2.20
     30      1     2     --    --   weak    184   111    3.69    2.31    3.64   
 2.84

Table of horizontal segments:
  index   pos   delta   dir   from   to   link  serif  edge  height  extra     
flags
      0    736      0   left     8    10    --     --     3     102     20      
  round
      1    191      0  right    18     0    --     --     2      40      1      
 normal
      2    111      0   left    30    20     3     --     1      97     28      
  round
      3    -14      0  right    24    26     2     --     0      97     28      
  round

Table of vertical segments:
  index   pos   delta   dir   from   to   link  serif  edge  height  extra     
flags
      0    169      0     up     0     1     3     --     2     201     25      
  round
      1    211      0     up     5     7     2     --     3     123     30      
  round
      2     88      0   down    11    13     1     --     0     123     31      
  round
      3    127      2   down    16    18     0     --     1     273     47      
  round
      4     87      0   down    21    23     5     --     0      97     28      
  round
      5    212      0     up    27    29     4     --     3      97     28      
  round

Table of horizontal edges (1px=48.13u, 10u=0.21px):
  index    pos     dir   link  serif  blue    opos     pos       flags
      0    -0.30  right     1     --    y     -0.30     0.00        round
      1     2.31   left     0     --    n      2.31     2.84        round
      2     3.97  right    --     --    n      3.97     4.39       normal
      3    15.30   left    --     --    y     15.30    15.00        round

Table of vertical edges (1px=50.00u, 10u=0.20px):
  index    pos     dir   link  serif  blue    opos     pos       flags
      0     1.77   down     3     --    n      1.77     2.00        round
      1     2.55   down     2     --    n      2.55     3.00        round
      2     3.38     up     1     --    n      3.38     4.00        round
      3     4.22     up     0     --    n      4.22     4.09        round

  x advance: 384
  y advance: 0
  linear x advance: 387973
  linear y advance: 0
FT_Outline_Decompose: Outline 0
  move to (2.00, 4.39)
  cubic to (2.05, 10.62) with controls (2.00, 7.81) and (2.02, 8.80)
  cubic to (2.09, 13.14) with controls (2.08, 11.98) and (2.09, 12.58)
  cubic to (1.05, 15.00) with controls (2.09, 14.41) and (1.75, 15.00)
  cubic to (0.00, 13.17) with controls (0.36, 15.00) and (0.00, 14.38)
  cubic to (0.48, 10.62) with controls (0.00, 12.58) and (0.11, 11.98)
  cubic to (1.00, 4.39) with controls (1.00, 8.80) and (1.00, 7.88)
  line to (2.00, 4.39)
FT_Outline_Decompose: Outline 1
  move to (1.06, 2.84)
  cubic to (0.00, 1.44) with controls (0.47, 2.84) and (0.00, 2.20)
  cubic to (1.05, 0.00) with controls (0.00, 0.64) and (0.47, 0.00)
  cubic to (2.09, 1.44) with controls (1.64, 0.00) and (2.09, 0.64)
  cubic to (1.06, 2.84) with controls (2.09, 2.20) and (1.64, 2.84)
FT_Outline_Decompose: Done
band [0..15]: 31 cells
gray_sweep: start
gray_sweep: end
MD5 checksum for 15x3 bitmap:
  2F71C6552D50DD73130CE5EB6AB686C3

reply via email to

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