Home | History | Annotate | Download | only in autofit
      1 /***************************************************************************/
      2 /*                                                                         */
      3 /*  afstyles.h                                                             */
      4 /*                                                                         */
      5 /*    Auto-fitter styles (specification only).                             */
      6 /*                                                                         */
      7 /*  Copyright 2013-2015 by                                                 */
      8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
      9 /*                                                                         */
     10 /*  This file is part of the FreeType project, and may only be used,       */
     11 /*  modified, and distributed under the terms of the FreeType project      */
     12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
     13 /*  this file you indicate that you have read the license and              */
     14 /*  understand and accept it fully.                                        */
     15 /*                                                                         */
     16 /***************************************************************************/
     17 
     18 
     19   /* The following part can be included multiple times. */
     20   /* Define `STYLE' as needed.                          */
     21 
     22 
     23   /* Add new styles here.  The first and second arguments are the  */
     24   /* style name in lowercase and uppercase, respectively, followed */
     25   /* by a description string.  The next arguments are the          */
     26   /* corresponding writing system, script, blue stringset, and     */
     27   /* coverage.                                                     */
     28   /*                                                               */
     29   /* Note that styles using `AF_COVERAGE_DEFAULT' should always    */
     30   /* come after styles with other coverages.                       */
     31   /*                                                               */
     32   /* Example:                                                      */
     33   /*                                                               */
     34   /*   STYLE( cyrl_dflt, CYRL_DFLT,                                */
     35   /*          "Cyrillic default style",                            */
     36   /*          AF_WRITING_SYSTEM_LATIN,                             */
     37   /*          AF_SCRIPT_CYRL,                                      */
     38   /*          AF_BLUE_STRINGSET_CYRL,                              */
     39   /*          AF_COVERAGE_DEFAULT )                                */
     40 
     41 #undef  STYLE_LATIN
     42 #define STYLE_LATIN( s, S, f, F, ds, df, C ) \
     43           STYLE( s ## _ ## f, S ## _ ## F,   \
     44                  ds " " df " style",         \
     45                  AF_WRITING_SYSTEM_LATIN,    \
     46                  AF_SCRIPT_ ## S,            \
     47                  AF_BLUE_STRINGSET_ ## S,    \
     48                  AF_COVERAGE_ ## C )
     49 
     50 #undef  META_STYLE_LATIN
     51 #define META_STYLE_LATIN( s, S, ds )                     \
     52           STYLE_LATIN( s, S, c2cp, C2CP, ds,             \
     53                        "petite capticals from capitals", \
     54                        PETITE_CAPITALS_FROM_CAPITALS )   \
     55           STYLE_LATIN( s, S, c2sc, C2SC, ds,             \
     56                        "small capticals from capitals",  \
     57                        SMALL_CAPITALS_FROM_CAPITALS )    \
     58           STYLE_LATIN( s, S, ordn, ORDN, ds,             \
     59                        "ordinals",                       \
     60                        ORDINALS )                        \
     61           STYLE_LATIN( s, S, pcap, PCAP, ds,             \
     62                        "petite capitals",                \
     63                        PETITE_CAPITALS )                 \
     64           STYLE_LATIN( s, S, sinf, SINF, ds,             \
     65                        "scientific inferiors",           \
     66                        SCIENTIFIC_INFERIORS )            \
     67           STYLE_LATIN( s, S, smcp, SMCP, ds,             \
     68                        "small capitals",                 \
     69                        SMALL_CAPITALS )                  \
     70           STYLE_LATIN( s, S, subs, SUBS, ds,             \
     71                        "subscript",                      \
     72                        SUBSCRIPT )                       \
     73           STYLE_LATIN( s, S, sups, SUPS, ds,             \
     74                        "superscript",                    \
     75                        SUPERSCRIPT )                     \
     76           STYLE_LATIN( s, S, titl, TITL, ds,             \
     77                        "titling",                        \
     78                        TITLING )                         \
     79           STYLE_LATIN( s, S, dflt, DFLT, ds,             \
     80                        "default",                        \
     81                        DEFAULT )
     82 
     83 
     84   STYLE( arab_dflt, ARAB_DFLT,
     85          "Arabic default style",
     86          AF_WRITING_SYSTEM_LATIN,
     87          AF_SCRIPT_ARAB,
     88          AF_BLUE_STRINGSET_ARAB,
     89          AF_COVERAGE_DEFAULT )
     90 
     91   META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" )
     92 
     93   META_STYLE_LATIN( grek, GREK, "Greek" )
     94 
     95   STYLE( hebr_dflt, HEBR_DFLT,
     96          "Hebrew default style",
     97          AF_WRITING_SYSTEM_LATIN,
     98          AF_SCRIPT_HEBR,
     99          AF_BLUE_STRINGSET_HEBR,
    100          AF_COVERAGE_DEFAULT )
    101   META_STYLE_LATIN( latn, LATN, "Latin" )
    102 
    103   STYLE( deva_dflt, DEVA_DFLT,
    104          "Devanagari default style",
    105          AF_WRITING_SYSTEM_LATIN,
    106          AF_SCRIPT_DEVA,
    107          AF_BLUE_STRINGSET_DEVA,
    108          AF_COVERAGE_DEFAULT )
    109 
    110 #ifdef FT_OPTION_AUTOFIT2
    111   STYLE( ltn2_dflt, LTN2_DFLT,
    112          "Latin 2 default style",
    113          AF_WRITING_SYSTEM_LATIN2,
    114          AF_SCRIPT_LATN,
    115          AF_BLUE_STRINGSET_LATN,
    116          AF_COVERAGE_DEFAULT )
    117 #endif
    118 
    119   STYLE( none_dflt, NONE_DFLT,
    120          "no style",
    121          AF_WRITING_SYSTEM_DUMMY,
    122          AF_SCRIPT_NONE,
    123          (AF_Blue_Stringset)0,
    124          AF_COVERAGE_DEFAULT )
    125 
    126   STYLE( telu_dflt, TELU_DFLT,
    127          "Telugu default style",
    128          AF_WRITING_SYSTEM_LATIN,
    129          AF_SCRIPT_TELU,
    130          AF_BLUE_STRINGSET_TELU,
    131          AF_COVERAGE_DEFAULT )
    132 
    133   STYLE( thai_dflt, THAI_DFLT,
    134          "Thai default style",
    135          AF_WRITING_SYSTEM_LATIN,
    136          AF_SCRIPT_THAI,
    137          AF_BLUE_STRINGSET_THAI,
    138          AF_COVERAGE_DEFAULT )
    139 
    140 #ifdef AF_CONFIG_OPTION_INDIC
    141 
    142   /* no blue stringset support for the Indic writing system yet */
    143 #undef  STYLE_DEFAULT_INDIC
    144 #define STYLE_DEFAULT_INDIC( s, S, d )    \
    145           STYLE( s ## _dflt, S ## _DFLT,  \
    146                  d " default style",      \
    147                  AF_WRITING_SYSTEM_INDIC, \
    148                  AF_SCRIPT_ ## S,         \
    149                  (AF_Blue_Stringset)0,    \
    150                  AF_COVERAGE_DEFAULT )
    151 
    152   STYLE_DEFAULT_INDIC( beng, BENG, "Bengali" )
    153   STYLE_DEFAULT_INDIC( gujr, GUJR, "Gujarati" )
    154   STYLE_DEFAULT_INDIC( guru, GURU, "Gurmukhi" )
    155   STYLE_DEFAULT_INDIC( knda, KNDA, "Kannada" )
    156   STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
    157   STYLE_DEFAULT_INDIC( mlym, MLYM, "Malayalam" )
    158   STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )
    159   STYLE_DEFAULT_INDIC( sinh, SINH, "Sinhala" )
    160   STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" )
    161   STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
    162   STYLE_DEFAULT_INDIC( taml, TAML, "Tamil" )
    163   STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )
    164 
    165 #endif /* AF_CONFIG_OPTION_INDIC */
    166 
    167 #ifdef AF_CONFIG_OPTION_CJK
    168 
    169   STYLE( hani_dflt, HANI_DFLT,
    170          "CJKV ideographs default style",
    171          AF_WRITING_SYSTEM_CJK,
    172          AF_SCRIPT_HANI,
    173          AF_BLUE_STRINGSET_HANI,
    174          AF_COVERAGE_DEFAULT )
    175 
    176 #endif /* AF_CONFIG_OPTION_CJK */
    177 
    178 
    179 /* END */
    180