~ubuntu-branches/ubuntu/wily/hedgewars/wily

« back to all changes in this revision

Viewing changes to misc/libfreetype/src/autofit/afindic.c

  • Committer: Package Import Robot
  • Author(s): Dmitry E. Oboukhov
  • Date: 2011-09-23 10:16:55 UTC
  • mfrom: (1.2.11 upstream)
  • Revision ID: package-import@ubuntu.com-20110923101655-3977th2gc5n0a3pv
Tags: 0.9.16-1
* New upstream version.
 + Downloadable content! Simply click to install any content.
   New voices, hats, maps, themes, translations, music, scripts...
   Hedgewars is now more customisable than ever before! As time goes
   by we will be soliciting community content to feature on this page,
   so remember to check it from time to time. If you decide you want
   to go back to standard Hedgewars, just remove the Data directory
   from your Hedgewars config directory.
 + 3-D rendering! Diorama-like rendering of the game in a variety
   of 3D modes. Let us know which ones work best for you, we didn't
   really have the equipment to test them all.
 + Resizable game window.
 + New utilities! The Time Box will remove one of your hedgehogs
   from the game for a while, protecting from attack until it returns,
   somewhere else on the map. Land spray will allow you to build bridges,
   seal up holes, or just make life unpleasant for your enemies.
 + New single player: Bamboo Thicket, That Sinking Feeling, Newton and
   the Tree and multi-player: The Specialists, Space Invaders,
   Racer - scripts! And a ton more script hooks for scripters
 + New twists on old weapons. Drill strike, seduction and fire have
   been adjusted. Defective mines have been added, rope can attach to
   hogs/crates/barrels again, grenades now have variable bounce (use
   precise key + 1-5). Portal gun is now more usable in flight and
   all game actions are a lot faster.
 + New theme - Golf, dozens of new community hats and a new
   localised Default voice, Ukranian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************/
 
2
/*                                                                         */
 
3
/*  afindic.c                                                              */
 
4
/*                                                                         */
 
5
/*    Auto-fitter hinting routines for Indic scripts (body).               */
 
6
/*                                                                         */
 
7
/*  Copyright 2007, 2011 by                                                */
 
8
/*  Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.    */
 
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
#include "aftypes.h"
 
20
#include "aflatin.h"
 
21
 
 
22
 
 
23
#ifdef AF_CONFIG_OPTION_INDIC
 
24
 
 
25
#include "afindic.h"
 
26
#include "aferrors.h"
 
27
#include "afcjk.h"
 
28
 
 
29
 
 
30
#ifdef AF_CONFIG_OPTION_USE_WARPER
 
31
#include "afwarp.h"
 
32
#endif
 
33
 
 
34
 
 
35
  static FT_Error
 
36
  af_indic_metrics_init( AF_LatinMetrics  metrics,
 
37
                         FT_Face          face )
 
38
  {
 
39
    /* use CJK routines */
 
40
    return af_cjk_metrics_init( metrics, face );
 
41
  }
 
42
 
 
43
 
 
44
  static void
 
45
  af_indic_metrics_scale( AF_LatinMetrics  metrics,
 
46
                          AF_Scaler        scaler )
 
47
  {
 
48
    /* use CJK routines */
 
49
    af_cjk_metrics_scale( metrics, scaler );
 
50
  }
 
51
 
 
52
 
 
53
  static FT_Error
 
54
  af_indic_hints_init( AF_GlyphHints    hints,
 
55
                       AF_LatinMetrics  metrics )
 
56
  {
 
57
    /* use CJK routines */
 
58
    return af_cjk_hints_init( hints, metrics );
 
59
  }
 
60
 
 
61
 
 
62
  static FT_Error
 
63
  af_indic_hints_apply( AF_GlyphHints    hints,
 
64
                        FT_Outline*      outline,
 
65
                        AF_LatinMetrics  metrics)
 
66
  {
 
67
    /* use CJK routines */
 
68
    return af_cjk_hints_apply( hints, outline, metrics );
 
69
  }
 
70
 
 
71
 
 
72
  /*************************************************************************/
 
73
  /*************************************************************************/
 
74
  /*****                                                               *****/
 
75
  /*****                I N D I C   S C R I P T   C L A S S            *****/
 
76
  /*****                                                               *****/
 
77
  /*************************************************************************/
 
78
  /*************************************************************************/
 
79
 
 
80
 
 
81
  static const AF_Script_UniRangeRec  af_indic_uniranges[] =
 
82
  {
 
83
#if 0
 
84
    AF_UNIRANGE_REC( 0x0100UL, 0xFFFFUL ),  /* why this? */
 
85
#endif
 
86
    AF_UNIRANGE_REC( 0x0900UL, 0x0DFFUL),    /* Indic Range */
 
87
    AF_UNIRANGE_REC( 0x0F00UL, 0x0FFFUL),    /* Tibetan */
 
88
    AF_UNIRANGE_REC( 0x1900UL, 0x194FUL),    /* Limbu */
 
89
    AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL),    /* Sundanese */
 
90
    AF_UNIRANGE_REC( 0x1C80UL, 0x1CDFUL),    /* Meetei Mayak */
 
91
    AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL),    /* Syloti Nagri */
 
92
    AF_UNIRANGE_REC( 0x11800UL, 0x118DFUL),  /* Sharada */
 
93
    AF_UNIRANGE_REC(      0UL,      0UL)
 
94
  };
 
95
 
 
96
 
 
97
  AF_DEFINE_SCRIPT_CLASS(af_indic_script_class,
 
98
    AF_SCRIPT_INDIC,
 
99
    af_indic_uniranges,
 
100
 
 
101
    sizeof( AF_LatinMetricsRec ),
 
102
 
 
103
    (AF_Script_InitMetricsFunc) af_indic_metrics_init,
 
104
    (AF_Script_ScaleMetricsFunc)af_indic_metrics_scale,
 
105
    (AF_Script_DoneMetricsFunc) NULL,
 
106
 
 
107
    (AF_Script_InitHintsFunc)   af_indic_hints_init,
 
108
    (AF_Script_ApplyHintsFunc)  af_indic_hints_apply
 
109
  )
 
110
 
 
111
#else /* !AF_CONFIG_OPTION_INDIC */
 
112
 
 
113
  static const AF_Script_UniRangeRec  af_indic_uniranges[] =
 
114
  {
 
115
    { 0, 0 }
 
116
  };
 
117
 
 
118
 
 
119
  AF_DEFINE_SCRIPT_CLASS(af_indic_script_class,
 
120
    AF_SCRIPT_INDIC,
 
121
    af_indic_uniranges,
 
122
 
 
123
    sizeof( AF_LatinMetricsRec ),
 
124
 
 
125
    (AF_Script_InitMetricsFunc) NULL,
 
126
    (AF_Script_ScaleMetricsFunc)NULL,
 
127
    (AF_Script_DoneMetricsFunc) NULL,
 
128
 
 
129
    (AF_Script_InitHintsFunc)   NULL,
 
130
    (AF_Script_ApplyHintsFunc)  NULL
 
131
  )
 
132
 
 
133
#endif /* !AF_CONFIG_OPTION_INDIC */
 
134
 
 
135
 
 
136
/* END */