SHOW:
|
|
- or go back to the newest paste.
| 1 | (* write byte *) | |
| 2 | type font_language_code = {
| |
| 3 | | LCNone; (*0*) | |
| 4 | | LCLatin; (*1*) | |
| 5 | | LCJapanese; (*2*) | |
| 6 | | LCKorean; (*3*) | |
| 7 | | LCSimplifiedChinese; (*4*) | |
| 8 | | LCTraditionalChinese; (*5*) | |
| 9 | } | |
| 10 | ||
| 11 | type font_glyph_data = {
| |
| 12 | font_char_code: int; | |
| 13 | font_shape: shape_records; | |
| 14 | } | |
| 15 | ||
| 16 | type font_layout_glyph_data = {
| |
| 17 | font_advance: int; | |
| 18 | font_bounds: rect; | |
| 19 | } | |
| 20 | ||
| 21 | type font_kerning_data = {
| |
| 22 | font_char_code1: int; | |
| 23 | font_char_code2: int; | |
| 24 | font_adjust: int; | |
| 25 | } | |
| 26 | ||
| 27 | type font_layout_data = {
| |
| 28 | font_ascent: int; | |
| 29 | font_descent: int; | |
| 30 | font_leading: int; | |
| 31 | font_glyphs: font_layout_glyph_data list; | |
| 32 | font_kerning: font_kerning_data list; | |
| 33 | } | |
| 34 | ||
| 35 | type font2_data = {
| |
| 36 | font_shift_jis: bool; | |
| 37 | font_is_small: bool; | |
| 38 | font_is_ansi: bool; | |
| 39 | font_is_italic: bool; | |
| 40 | font_is_bold: bool; | |
| 41 | font_language: font_language_code; | |
| 42 | font_name: string; | |
| 43 | font_glyphs: font_glyph_data list; | |
| 44 | font_layout: font_layout_data option; | |
| 45 | } | |
| 46 | ||
| 47 | - | (* for now, omitting Font1(not for fonts linked to a class), Font2(only difference with Font3 is that it can have 'wideChars false') and Font4(OTF) *) |
| 47 | + | (* for now, omitting Font1(only used for static textfields), Font2(only difference with Font3 is that it can have 'wideChars false') and Font4(OTF) *) |
| 48 | type font = | |
| 49 | | Font3 of font2_data; |