41 #define opbyte(x) (x.b2)
42 #define rembyte(x) (x.b3)
45 #define stopflag qi(128)
47 #define kernflag qi(128)
48 #define skipbyte(x) x.b0
49 #define nextchar(x) x.b1
52 #define charexists(x) ((x).b0>MIN_QUARTER_WORD)
53 #define chartag(x) ((qo((x).b2)) % 4)
56 #define heightdepth(x) qo(x.b1)
59 #define ligkernstart(x, y) (ligkernbase[(x)] + rembyte(y))
61 #define ligkernrestart(x, y) \
62 (ligkernbase[(x)] + opbyte(y) * 256 + rembyte(y) - kernbaseoffset + 32768L)
70 #define kernbaseoffset 32768
73 #define param(x, y) (fontinfo[(x) + parambase[y]].sc)
74 #define slant(x) param(SLANT_CODE,x)
75 #define space(x) param(SPACE_CODE,x)
76 #define spacestretch(x) param(SPACE_STRETCH_CODE,x)
77 #define spaceshrink(x) param(SPACE_SHRINK_CODE,x)
78 #define xheight(x) param(X_HEIGHT_CODE,x)
79 #define quad(x) param(QUAD_CODE,x)
80 #define extraspace(x) param(EXTRA_SPACE_CODE,x)
86 #define exttop(x) x.b0
87 #define extmid(x) x.b1
88 #define extbot(x) x.b2
89 #define extrep(x) x.b3
93 static_assert(
FONT_BASE == 0,
"FONT_BASE == 0");
95 "InternalFontNumber = [FONT_BASE, FONT_MAX] = [0, 75]");
110 "FontIndex = [0, FONT_MEM_SIZE] = [0, 200000]");
Pointer FontIndex
Definition: fonts.h:108
#define UMAXOF(t)
取无符号类型的最大值
Definition: global_macros.h:9
uint32_t HalfWord
[p43#113]: HalfWord(16=>32) .
Definition: tex_types.h:127
#define FONT_MAX
[#11] maximum internal font number.
Definition: tex_constant.h:82
#define FONT_BASE
[#12] smallest internal font number.
Definition: tex_constant.h:133
#define FONT_MEM_SIZE
[#11] number of words of fontinfo for all fonts.
Definition: tex_constant.h:87
UChar EightBits
[#25]: EightBits::UChar(8) = [0, 255]
Definition: tex_types.h:98
uint_fast32_t StrNumber
Definition: str.h:73
FourQuarters charinfo(InternalFontNumber f, EightBits p)
Definition: fonts.c:82
Integer get_hyphenchar(InternalFontNumber x)
Definition: fonts.c:75
StrNumber get_fontname(InternalFontNumber x)
Definition: fonts.c:79
TFMParamVal
[p200#547]
Definition: fonts.h:28
Integer ligkernbase[FONT_MAX+1]
base addresses for ligature/kerning programs.
Definition: fonts.c:60
MemoryWord fontinfo[FONT_MEM_SIZE+1]
the big collection of font data
Definition: fonts.c:25
void fonts_dump()
[#1320] Dump the font information.
Definition: fonts.c:161
Integer extenbase[FONT_MAX+1]
base addresses for extensible recipes.
Definition: fonts.c:64
EightBits fontec[FONT_MAX+1]
ending (largest) character code.
Definition: fonts.c:36
FourQuarters nullcharacter
Definition: fonts.c:69
FourQuarters get_fontcheck(InternalFontNumber x)
Definition: fonts.c:80
Integer get_skewchar(InternalFontNumber x)
Definition: fonts.c:73
void font_init()
[#551, #556]
Definition: fonts.c:107
HalfWord newcharacter(InternalFontNumber f, EightBits c)
[#582]
Definition: fonts.c:982
void fonts_init_once(void)
[#552] TeX always knows at least one font, namely the null font.
Definition: fonts.c:125
int fonts_undump()
[#1321] Undump the font information.
Definition: fonts.c:229
Integer parambase[FONT_MAX+1]
base addresses for font parameters.
Definition: fonts.c:66
InternalFontNumber readfontinfo(Pointer u, StrNumber nom, StrNumber aire, Scaled s)
[p205#560]: input a TFM file.
Definition: fonts.c:309
Scaled charkern(InternalFontNumber x, FourQuarters y)
Definition: fonts.c:102
Scaled charheight(InternalFontNumber x, Integer y)
Definition: fonts.c:94
Scaled charitalic(InternalFontNumber x, FourQuarters y)
Definition: fonts.c:90
InternalFontNumber fontptr
largest internal font number in use
Definition: fonts.c:27
EightBits fontbc[FONT_MAX+1]
beginning (smallest) character code
Definition: fonts.c:35
FontIndex fmemptr
first unused word of font info
Definition: fonts.c:26
Scaled chardepth(InternalFontNumber x, Integer y)
Definition: fonts.c:98
Boolean fontused[FONT_MAX+1]
has a character from this font actually appeared in the output?
Definition: fonts.c:40
Scaled charwidth(InternalFontNumber x, FourQuarters y)
Definition: fonts.c:86
void findfontdimen(Boolean writing)
[#578] sets cur_val to font_info location.
Definition: fonts.c:914
UChar InternalFontNumber
[#548]: [FONT_BASE, FONT_MAX] = [0, 75]
Definition: fonts.h:92
void charwarning(InternalFontNumber f, EightBits c)
[#581]
Definition: fonts.c:970
void set_skewchar(InternalFontNumber x, Integer c)
Definition: fonts.c:74
Integer fontbchar[FONT_MAX+1]
right boundary character, non char if there is none.
Definition: fonts.c:47
FontIndex fontparams[FONT_MAX+1]
how many font parameters are present
Definition: fonts.c:32
FontIndex bcharlabel[FONT_MAX+1]
start of lig kern program for left boundary character, non address if there is none.
Definition: fonts.c:45
void set_hyphenchar(InternalFontNumber x, Integer c)
Definition: fonts.c:76
Integer fontfalsebchar[FONT_MAX+1]
font bchar if it doesn’t exist in the font, otherwise non char.
Definition: fonts.c:49
CharTag
[p198#544]: tag field in a char_info_word that explain how to interpret the remainder field.
Definition: fonts.h:20
Scaled get_fontdsize(InternalFontNumber x)
Definition: fonts.c:78
Scaled get_fontsize(InternalFontNumber x)
Definition: fonts.c:77
Pointer fontglue[FONT_MAX+1]
glue specification for interword space, null if not allocated.
Definition: fonts.c:38
void scanfontident(void)
[#577] Declare procedures that scan font-related stuff.
Definition: fonts.c:884
@ SPACE_SHRINK_CODE
Definition: fonts.h:34
@ SPACE_STRETCH_CODE
Definition: fonts.h:33
@ QUAD_CODE
Definition: fonts.h:36
@ TFM_PARAM_MISSING
TeX sets the missing parameters to zero
Definition: fonts.h:29
@ X_HEIGHT_CODE
Definition: fonts.h:35
@ SPACE_CODE
Definition: fonts.h:32
@ SLANT_CODE
Definition: fonts.h:31
@ EXTRA_SPACE_CODE
Definition: fonts.h:37
@ LIST_TAG
character has a successor in a charlist
Definition: fonts.h:23
@ NO_TAG
vanilla character
Definition: fonts.h:21
@ EXT_TAG
character is extensible
Definition: fonts.h:24
@ LIG_TAG
character has a ligature/kerning program
Definition: fonts.h:22
[p43#113]: FourQuarters(64) .
Definition: tex_types.h:159
int64_t Integer
Integer(64) =
Definition: tex_types.h:42
Integer Scaled
[p38#101]: Scaled::Integer(64) = we need Pascal's Integer(32/64), dependent upon the bit size of the...
Definition: tex_types.h:106
size_t Pointer
Pointer::size_t(64), a flag or a location in mem or eqtb.
Definition: tex_types.h:45
bool Boolean
布尔类型定义
Definition: tex_types.h:11
uint8_t UChar
UChar(8) = [0, 255]
Definition: tex_types.h:38
[p43#113]: MemoryWord(64) .
Definition: tex_types.h:164