freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Autohinter: stem darkening, first rough prototype


From: Werner LEMBERG
Subject: Re: [ft-devel] Autohinter: stem darkening, first rough prototype
Date: Fri, 28 Aug 2015 10:27:20 +0200 (CEST)

> I changed the strategy to get the standard_width of a face. Instead
> of relying on the hard-to-follow workings of the style analyzers,
> [...]

Where's the problem?  The auto-hinter provides different standard
width values depending on the script.  It tries up to three characters
(cf. the last three arguments to the `SCRIPT' macro in file
`afscript.h') in function `af_latin_metrics_init_widths' for finding a
standard width.  As soon as we have found a glyph (the first hit
wins), all stems of the glyph are computed, which are then sorted and
quantized.  The result of this process is stored in the `widths' array
of `AF_LatinAxisRec'; the smallest one is handled as the default
width.  If no width could be determined, a default value of 50/2048 em
is used.

> What I now want to do:
> - Find out how to access SFNT->CFF->PrivateDict.

Direct access is not possible except with ugly hacks.  The proper way
– in case you *really* need this – would be to add a function
`cff_ps_get_font_private', similar to `t1_ps_get_font_private', which
should fill a `PS_PrivateRec' structure with available data.  Note,
however, that it doesn't make much sense IMHO to provide this function
since CFFs can have multiple sub fonts with different private
dictionaries and thus different default widths.  This is the very
reason it is intentionally missing.

> - Find out how to to run style analyzers over the face in a
>   controlled way to compute real standard_widths.

I don't understand this.  Please elaborate.


    Werner

reply via email to

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