~ubuntu-branches/ubuntu/wily/luatex/wily

« back to all changes in this revision

Viewing changes to source/texk/web2c/luatexdir/font/texfont.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2010-04-29 00:47:19 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20100429004719-o42etkqe90n97b9e
Tags: 0.60.1-1
* new upstream release, adapt build-script patch
* disable patch: upstream-epstopdf_cc_no_xpdf_patching, included upstream
* disable patch: libpoppler-0.12, not needed anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* texfont.h Main font API implementation for the pascal parts
2
 
   
3
 
   Copyright 2006-2008 Taco Hoekwater <taco@luatex.org>
 
2
 
 
3
   Copyright 2006-2010 Taco Hoekwater <taco@luatex.org>
4
4
 
5
5
   This file is part of LuaTeX.
6
6
 
17
17
   You should have received a copy of the GNU General Public License along
18
18
   with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
19
19
 
20
 
/* $Id: texfont.h 3261 2009-12-18 11:38:21Z taco $ */
 
20
/* $Id: texfont.h 3482 2010-03-13 11:18:28Z taco $ */
21
21
 
22
22
/* Here we have the interface to LuaTeX's font system, as seen from the
23
23
   main pascal program. There is a companion list in luatex.defines to
24
24
   keep web2c happy */
25
25
 
26
26
/* this file is read at the end of ptexlib.h, which is called for at
27
 
   the end of luatexcoerce.h, as well as from the C sources 
 
27
   the end of luatexcoerce.h, as well as from the C sources
28
28
*/
29
29
 
30
30
#ifndef TEXFONT_H
105
105
typedef struct texfont {
106
106
    int _font_size;
107
107
    int _font_dsize;
 
108
    int _font_units_per_em;
108
109
    char *_font_name;
109
110
    char *_font_area;
110
111
    char *_font_filename;
122
123
    char _font_touched;         /* internal information */
123
124
    int _font_cache_id;         /* internal information */
124
125
    char _font_encodingbytes;   /* 1 or 2 bytes */
 
126
 
125
127
    int _font_slant;            /* a slant in ppt */
126
128
    int _font_extend;           /* an extension in ppt, or 1000 */
 
129
    int _font_expand_ratio;     /* expansion ratio of a particular font */
 
130
    internal_font_number _font_shrink;  /* font at limit of shrinking */
 
131
    internal_font_number _font_stretch; /* font at limit of stretching */
 
132
    int _font_step;             /* amount of one step of expansion */
 
133
    boolean _font_auto_expand;  /* this font is auto-expanded? */
 
134
 
127
135
    char _font_tounicode;       /* 1 if info is present */
128
 
    fm_entry_ptr _font_map;
 
136
    fm_entry *_font_map;
129
137
    int _font_type;
130
138
    int _font_format;
131
139
    int _font_embedding;
151
159
    int ligatures_disabled;
152
160
 
153
161
    int _pdf_font_num;          /* maps to a PDF resource ID */
154
 
    scaled _pdf_font_size;      /* maps to a PDF font size */
155
162
    internal_font_number _pdf_font_blink;       /* link to  base font for expanded fonts */
156
163
    internal_font_number _pdf_font_elink;       /* link to expanded fonts for base font */
157
 
    int _pdf_font_expand_ratio; /* expansion ratio of a particular font */
158
 
    internal_font_number _pdf_font_shrink;      /* font at limit of shrinking */
159
 
    internal_font_number _pdf_font_stretch;     /* font at limit of stretching */
160
 
    int _pdf_font_step;         /* amount of one step of expansion */
161
 
    boolean _pdf_font_auto_expand;      /* this font is auto-expanded? */
162
164
    str_number _pdf_font_attr;  /* pointer to additional attributes */
163
165
} texfont;
164
166
 
183
185
    full_embedding,
184
186
} font_embedding_option;
185
187
 
186
 
extern char *font_type_strings[];
187
 
extern char *font_format_strings[];
188
 
extern char *font_embedding_strings[];
 
188
extern const char *font_type_strings[];
 
189
extern const char *font_format_strings[];
 
190
extern const char *font_embedding_strings[];
189
191
 
190
192
 
191
193
#  define font_checksum(a)          font_tables[a]->_font_checksum
201
203
#  define font_dsize(a)             font_tables[a]->_font_dsize
202
204
#  define set_font_dsize(a,b)       font_dsize(a) = b
203
205
 
 
206
#  define font_units_per_em(a)             font_tables[a]->_font_units_per_em
 
207
#  define set_font_units_per_em(a,b)       font_units_per_em(a) = b
 
208
 
204
209
#  define font_name(a)              font_tables[a]->_font_name
205
210
#  define get_font_name(a)          (unsigned char *)font_name(a)
206
211
#  define set_font_name(f,b)        font_name(f) = b
207
212
#  define tex_font_name(a)          maketexstring(font_name(a))
208
213
 
209
 
boolean cmp_font_name(int, str_number);
210
 
 
211
214
#  define font_area(a)              font_tables[a]->_font_area
212
215
#  define get_font_area(a)          (unsigned char *)font_area(a)
213
216
#  define set_font_area(f,b)        font_area(f) = b
229
232
#  define font_encodingname(a)        font_tables[a]->_font_encodingname
230
233
#  define set_font_encodingname(f,b)  font_reassign(font_encodingname(f),b)
231
234
 
232
 
boolean font_shareable(internal_font_number, internal_font_number);
233
 
 
234
235
#  define cmp_font_filename(a,b)      (!(font_filename(a)!=NULL || font_filename(b)!=NULL || \
235
236
                                       strcmp(font_filename(a),font_filename(b))))
236
237
#  define cmp_font_fullname(a,b)      (!(font_fullname(a)!=NULL || font_fullname(b)!=NULL || \
288
289
#  define font_extend(a)              font_tables[a]->_font_extend
289
290
#  define set_font_extend(a,b)        font_extend(a) = b
290
291
 
 
292
#  define font_expand_ratio(a)        font_tables[a]->_font_expand_ratio
 
293
#  define set_font_expand_ratio(a,b)  font_expand_ratio(a) = b
 
294
 
 
295
#  define font_shrink(a)              font_tables[a]->_font_shrink
 
296
#  define set_font_shrink(a,b)        font_shrink(a) = b
 
297
 
 
298
#  define font_stretch(a)             font_tables[a]->_font_stretch
 
299
#  define set_font_stretch(a,b)       font_stretch(a) = b
 
300
 
 
301
#  define font_step(a)                font_tables[a]->_font_step
 
302
#  define set_font_step(a,b)          font_step(a) = b
 
303
 
 
304
#  define font_auto_expand(a)         font_tables[a]->_font_auto_expand
 
305
#  define set_font_auto_expand(a,b)   font_auto_expand(a) = b
 
306
 
291
307
#  define font_tounicode(a)           font_tables[a]->_font_tounicode
292
308
#  define set_font_tounicode(a,b)     font_tounicode(a) = b
293
309
 
300
316
#  define font_natural_dir(a)         font_tables[a]->_font_natural_dir
301
317
#  define set_font_natural_dir(a,b)   font_natural_dir(a) = b
302
318
 
303
 
#  define pdf_font_size(a)            font_tables[a]->_pdf_font_size
304
 
#  define set_pdf_font_size(a,b)      pdf_font_size(a) = b
305
 
 
306
319
#  define pdf_font_num(a)             font_tables[a]->_pdf_font_num
307
320
#  define set_pdf_font_num(a,b)       pdf_font_num(a) = b
308
321
 
309
 
#  define pdf_font_blink(a)            font_tables[a]->_pdf_font_blink
310
 
#  define set_pdf_font_blink(a,b)      pdf_font_blink(a) = b
311
 
 
312
 
#  define pdf_font_elink(a)            font_tables[a]->_pdf_font_elink
313
 
#  define set_pdf_font_elink(a,b)      pdf_font_elink(a) = b
314
 
 
315
 
#  define pdf_font_expand_ratio(a)            font_tables[a]->_pdf_font_expand_ratio
316
 
#  define set_pdf_font_expand_ratio(a,b)      pdf_font_expand_ratio(a) = b
317
 
 
318
 
#  define pdf_font_shrink(a)            font_tables[a]->_pdf_font_shrink
319
 
#  define set_pdf_font_shrink(a,b)      pdf_font_shrink(a) = b
320
 
 
321
 
#  define pdf_font_stretch(a)            font_tables[a]->_pdf_font_stretch
322
 
#  define set_pdf_font_stretch(a,b)      pdf_font_stretch(a) = b
323
 
 
324
 
#  define pdf_font_step(a)            font_tables[a]->_pdf_font_step
325
 
#  define set_pdf_font_step(a,b)      pdf_font_step(a) = b
326
 
 
327
 
#  define pdf_font_auto_expand(a)            font_tables[a]->_pdf_font_auto_expand
328
 
#  define set_pdf_font_auto_expand(a,b)      pdf_font_auto_expand(a) = b
 
322
#  define pdf_font_blink(a)           font_tables[a]->_pdf_font_blink
 
323
#  define set_pdf_font_blink(a,b)     pdf_font_blink(a) = b
 
324
 
 
325
#  define pdf_font_elink(a)           font_tables[a]->_pdf_font_elink
 
326
#  define set_pdf_font_elink(a,b)     pdf_font_elink(a) = b
329
327
 
330
328
#  define pdf_font_attr(a)            font_tables[a]->_pdf_font_attr
331
329
#  define set_pdf_font_attr(a,b)      pdf_font_attr(a) = b
529
527
extern char *char_name(internal_font_number f, int c);
530
528
extern int char_index(internal_font_number f, int c);
531
529
 
532
 
scaled raw_get_kern(internalfontnumber f, int lc, int rc);
533
 
scaled get_kern(internalfontnumber f, int lc, int rc);
534
 
liginfo get_ligature(internalfontnumber f, int lc, int rc);
 
530
scaled raw_get_kern(internal_font_number f, int lc, int rc);
 
531
scaled get_kern(internal_font_number f, int lc, int rc);
 
532
liginfo get_ligature(internal_font_number f, int lc, int rc);
535
533
 
536
534
#  define EXT_TOP 0
537
535
#  define EXT_BOT 1
567
565
extern void set_rp_code(internal_font_number f, int c, int i);
568
566
extern void set_ef_code(internal_font_number f, int c, int i);
569
567
 
570
 
int read_tfm_info(internal_font_number f, char *nom, scaled s);
 
568
int read_tfm_info(internal_font_number f, const char *nom, scaled s);
571
569
 
572
570
 
573
571
/* from dofont.c */
574
572
 
575
 
extern int read_font_info(pointer u, str_number nom, scaled s, int ndir);
576
 
extern int find_font_id(char *nom, scaled s);
 
573
extern int read_font_info(pointer u, char *cnom, scaled s, int ndir);
 
574
extern int find_font_id(const char *nom, scaled s);
577
575
 
578
576
/* for and from vfpacket.c */
579
577
 
596
594
extern void do_vf_packet(PDF pdf, internal_font_number vf_f, int c);
597
595
extern int vf_packet_bytes(charinfo * co);
598
596
 
599
 
charinfo *copy_charinfo(charinfo * ci);
 
597
extern charinfo *copy_charinfo(charinfo * ci);
 
598
 
 
599
/* this function is in vfovf.c for the moment */
 
600
extern int make_vf_table(lua_State * L, const char *name, scaled s);
600
601
 
601
602
/* some bits of the old interface, used by e.g. writet3.c */
602
603