Commit Graph

30 Commits

Author SHA1 Message Date
Alexei Podtelezhnikov e85422606d Typos. 2016-04-08 23:21:34 -04:00
Werner Lemberg bf8f100d2c [autofit] Provide dummy blue zone for pseudo script `none'.
Even if the dummy hinter is used as the handler for `none' (which
doesn't use blue zones), it is more consistent than the old value
(which was 0), pointing to Arabic...

* src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
2016-04-05 11:43:58 +02:00
Werner Lemberg 5c7646d226 [autofit] Add blue-zone support for Sinhala script.
This essentially moves the Sinhala script from the `Indic' hinter to
the `Latin' hinter.

* src/autofit/afblue.dat: Add blue zone data for Sinhala.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Sinhala standard character and move data
out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Sinhala data out of
AF_CONFIG_OPTION_INDIC block.

* src/autofit/afstyles.h: Update Sinhala data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2016-02-29 09:12:35 +01:00
Werner Lemberg 44324b3746 [autofit] Add blue-zone support for Tamil script.
This essentially moves the Tamil script from the `Indic' hinter to
the `Latin' hinter.

* src/autofit/afblue.dat: Add blue zone data for Tamil.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Tamli standard character and move data
out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Tamil data out of
AF_CONFIG_OPTION_INDIC block.

* src/autofit/afstyles.h: Update Tamil data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2016-02-25 06:58:47 +01:00
Werner Lemberg a5952d3049 [autofit] Add blue-zone support for Malayalam script.
This essentially moves the Malayalam script from the `Indic' hinter
to the `Latin' hinter.

* src/autofit/afblue.dat: Add blue zone data for Malayalam.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Malayalam standard characters and move
data out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Malayalam data out of
AF_CONFIG_OPTION_INDIC block.

* src/autofit/afstyles.h: Update Malayalam data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2016-02-18 12:56:38 +01:00
Werner Lemberg 8d810097fd [autofit] Add blue-zone support for Kannada script.
This essentially moves the Kannada script from the `Indic' hinter to
the `Latin' hinter.

* src/autofit/afblue.dat: Add blue zone data for Kannada.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Kannada standard characters and move
data out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Kannada data out of
AF_CONFIG_OPTION_INDIC block.

* src/autofit/afstyles.h: Update Kannada data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2016-01-28 10:13:24 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 1f80c8152b Whitespace. 2015-12-16 08:22:42 +01:00
Werner Lemberg 02451c7917 [autofit] Add blue-zone support for Bengali script.
This essentially moves the Bengali script from the `Indic' hinter to
the `Latin' hinter.

* src/autofit/afblue.dat: Add blue zone data for Bengali.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Bengali standard characters and move
data out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Bengali data out of
AF_CONFIG_OPTION_INDIC block.

* src/autofit/afstyles.h: Update Bengali data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2015-12-15 17:53:46 +01:00
Werner Lemberg d8f9a453b2 [autofit] Add support for Myanmar script.
* src/autofit/afblue.dat: Add blue zone data for Myanmar.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Myanmar standard characters.

* src/autofit/afranges.c: Add Myanmar data.

* src/autofit/afstyles.h: Add Myanmar data.
2015-12-13 15:54:17 +01:00
Werner Lemberg 0164d934b6 [autofit] Introduce subscript top blue zones.
This feature is mainly for Khmer: The idea is to avoid a clash
between the top of subscript glyphs and the bottom of normal
baseline glyphs.

This only works for character clusters mapped to multiple glyphs.

* src/autofit/afblue.dat: Add subscript top blue zone for Khmer.

* src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
macro.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
AF_LATIN_BLUE_SUB_TOP): New macros.

* src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
blue zone property.
Update tracing messages.
(af_latin_metrics_scale_dim): Handle new blue zone property.
(af_latin_hints_compute_blue_edges): Updated.
2015-12-09 20:04:18 +01:00
Werner Lemberg c13526e6af * src/autofit/afblue.dat: Add more Khmer clusters.
Some fonts have incorrect ligatures; we need more samples to get a
good mean value.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2015-12-08 09:48:50 +01:00
Werner Lemberg facb79abdc [autofit] Add support for Khmer script.
We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
`Khmer symbols' (`khms', U+19E0-U+19FF).

* src/autofit/afblue.dat: Add blue zone data for Khmer.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Khmer standard characters.

* src/autofit/afranges.c: Add Khmer data.

* src/autofit/afstyles.h: Add Khmer data.
2015-12-06 19:34:59 +01:00
Werner Lemberg a8a54c3060 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
Another preparation for character cluster support.

* src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
2015-12-05 13:26:44 +01:00
Werner Lemberg a3046567bc [autofit] Add support for Lao script.
Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
characters!

* src/autofit/afblue.dat: Add blue zone data for Lao.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Lao standard characters.

* src/autofit/afranges.c: Add Lao data.

* src/autofit/afstyles.h: Add Lao data.
2015-09-28 09:45:56 +02:00
Werner Lemberg d3cba0ed30 [autofit] Redesign code ranges (2/2).
This commit adds two fallback scripts (`latb', `latp') and
implements support for the no-base character ranges introduced in
the previous commit.

* src/autofit/aftypes.h (AF_ScriptClassRec): Add
`script_uni_nobase_ranges' field.
(AF_DEFINE_SCRIPT_CLASS): Updated.

* src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
`latp' fallback scripts.

* src/autofit/afblue.dat: Add blue zones for Latin subscript and
superscript fallback scripts.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
characters.
(AF_STYLE_MASK): Updated.

* src/autofit/afglobal.c (SCRIPT): Updated.
(af_face_globals_compute_style_coverage): Handle new style flag.

* src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
flag.

* src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
2015-09-04 10:28:53 +02:00
Werner Lemberg ff406e2e58 [autofit] Improve Arabic hinting.
Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
ttfautohint).

* src/autofit/afblue.dat: Add neutral blue zone for the tatweel
character.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2015-08-06 07:34:50 +02:00
Werner Lemberg d3284462c3 [autofit] Add support for Arabic script.
Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!

* src/autofit/afblue.dat: Add blue zone data for Arabic.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Arabic standard characters.

* src/autofit/afranges.c: Add Arabic data.

* src/autofit/afstyles.h: Add Arabic data.

* docs/CHANGES: Document it.
2015-03-11 16:45:58 +01:00
Werner Lemberg 19146a5302 [autofit] Add support for Thai script.
Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
zone characters!

* src/autofit/afblue.dat: Add blue zone data for Thai.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Thai standard characters.

* src/autofit/afranges.c: Add Thai data.

* src/autofit/afstyles.h: Add Thai data.
2015-01-31 11:01:33 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg c9c33f202e [autofit] Add blue-zone support for Telugu.
This essentially moves the Telugu script from the `Indic' hinter to
the `Latin' hinter.

Note that this is a first shot and quite certainly needs
refinements.

* src/autofit/afblue.dat: Add blue zone data for Telugu.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Telugu standard characters and move
data out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Telugu data out of
AF_CONFIG_OPTION_INDIC block.

* src/autofit/afstyles.h: Update Telugu data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2014-10-18 11:01:14 +02:00
Werner Lemberg c576bb0d21 [autofit] Add blue-zone support for Devanagari.
This essentially moves the Devanagari script from the `Indic' hinter
to the `Latin' hinter.  Thanks to Girish Dalvi
<girish.dalvi@gmail.com> for guidance with blue zone characters!

* src/autofit/afblue.dat: Add blue zone data for Devanagari.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Devanagari standard characters and
move data out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Devanagari data out of
AF_CONFIG_OPTION_INDIC block.
Move U+20B9, (new) Rupee sign, from Latin to Devanagari.

* src/autofit/afstyles.h: Update Devanagari data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2014-05-01 17:24:19 +02:00
Werner Lemberg ccfc4b4c4e [autofit] Introduce neutral blue zones to the latin module.
Such blue zones match either the top or the bottom of a contour.  We
need them for scripts where accent-like elements directly touch the
base character (for example, some vowel signs in Devanagari, cf.
U+0913 or U+0914).

* src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
property.

* src/autofit/afblue.h: Regenerated.

* src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
(AF_LATIN_BLUE_NEUTRAL): New enumeration value.

* src/autofit/aflatin.c (af_latin_metrics_init_blues,
af_latin_hints_compute_blue_edges): Handle neutral blue zones.
2014-04-28 21:13:14 +02:00
Werner Lemberg 98e510ee94 [autofit] Fix Savannah bug #42148.
The adaptation of the cjk auto-hinter module to blue stringsets in
2013-08-25 had three severe bugs.  Mea culpa.

1. Contrary to the latin auto-hinter, characters for reference and
   overshoot values of a blue zone are specified separately.  Due to
   the screwed-up change it didn't work at all.

2. A boolean comparison was erroneously replaced with a cast,
   causing invalid results with the `^' operator later on.  The
   visual artifact caused by this problem is the topic of the bug
   report.

3. Two flag values were inverted, causing incorrect assignment of
   reference and overshoot values.

* src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
syntax to have both reference and overshoot characters in a single
string.  This is error #1.
Add extensive comments.

* src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
longer used.
(AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
This is error #3.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
Use character `|' to separate characters for reference and overshoot
values.
Improve tracing messages, synchronizing them with the latin
auto-hinter.
(af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
This is error #2.
(af_cjk_align_linked_edge): Add tracing message.

* src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
used.
2014-04-20 22:11:27 +02:00
Werner Lemberg 75efc2d0bd [autofit] s/SMALL_TOP/X_HEIGHT/.
* src/autofit/afblue.dat: Updated.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/aflatin.c, src/autofit/aflatin.h,
src/autofit/atlatin2.c: Updated.
2013-10-19 21:46:03 +02:00
Werner Lemberg 34efe05ce0 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2013-10-19 21:14:40 +02:00
Werner Lemberg 5a4c5a5b23 [autofit] Disunify Cyrillic and Greek handling from Latin.
* src/autofit/afscript.h: Add Cyrillic and Greek.

* src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
(AF_BLUE_STRINGSET_LATN): Fix typo.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
arrays.
(af_grek_script_class, af_cyrl_script_class): New scripts.
* src/autofit/aflatin.h: Updated.
2013-09-22 22:37:26 +02:00
Werner Lemberg 3f542498b2 [autofit] Improve Hebrew rendering.
This change introduces a new blue zone property
`AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
top segments.

* src/autofit/afblue.dat: Fix Hebrew blue strings.
Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.

* src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.

* src/autofit/afblue.c, src/autofit/afblue.h: Updated.

* src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
`AF_LATIN_IS_LONG_BLUE'.

* src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
2013-09-11 23:08:31 +02:00
Werner Lemberg 371f5c3b9d [autofit] Add support for Hebrew script.
* src/autofit/afblue.dat: Add blue strings for Hebrew.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/aflatin.c (af_hebr_uniranges): New array.
(af_hebr_script_class): New script.
* src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
2013-08-26 20:11:24 +02:00
Werner Lemberg 8b8be78385 [autofit] Introduce data file for blue strings.
The idea is to have a central file which gets processed by a Perl
script to create proper `.c' and `.h' files using templates.  There
are two other reasons to do that:

  . The data file should be easily readable.  We use UTF-8 encoding
    which then gets converted to single bytes.

  . Since the number of supported scripts will increase soon, the
    current usage of blue string arrays is a waste of space.  Using
    the Perl script it is possible to imitate jagged arrays,
    defining enumeration constants as offsets into the arrays.

This commit only adds files without changing any functionality.

* src/autofit/afblue.dat: New data file.
* src/tools/afblue.pl: New Perl script for processing `afblue.dat'.

* src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
for...
* src/autofit/afblue.c, src/autofit/afblue.c: New source files.
To avoid a dependency on Perl, we add them too.
2013-08-25 08:01:41 +02:00