diff options
| author | YAMAMOTO Mitsuharu | 2005-12-22 08:17:01 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2005-12-22 08:17:01 +0000 |
| commit | 06505fd8488e37789078acca9868c264f559afc6 (patch) | |
| tree | 8ac5d3f4d0412a94e5903c643a243cf9cc475e7d /src | |
| parent | 26ab4ea8c4225708d9108c1c1ea68ac7a2baf4f3 (diff) | |
| download | emacs-06505fd8488e37789078acca9868c264f559afc6.tar.gz emacs-06505fd8488e37789078acca9868c264f559afc6.zip | |
(XCharStruct): Remove member `valid_p'.
(STORE_XCHARSTRUCT): Don't set member `valid_p'.
(XCharStructRow): New typedef.
(XCHARSTRUCTROW_CHAR_VALID_P, XCHARSTRUCTROW_SET_CHAR_VALID): New
macros.
(struct MacFontStruct): Add member `bounds'. Remove member
`per_char'. All uses for QuichDraw Text fonts are changed to
`bounds.per_char'. ATSUI font bounds are represented as an array
`bounds.rows' of XCharStructRow's, each of which consists of a
bitmap of valid entries and an array of char bounds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macgui.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/macgui.h b/src/macgui.h index 40244dbc7c6..74c64bfb41d 100644 --- a/src/macgui.h +++ b/src/macgui.h | |||
| @@ -109,7 +109,6 @@ typedef struct _XCharStruct | |||
| 109 | #if 0 | 109 | #if 0 |
| 110 | unsigned short attributes; /* per char flags (not predefined) */ | 110 | unsigned short attributes; /* per char flags (not predefined) */ |
| 111 | #endif | 111 | #endif |
| 112 | unsigned valid_p : 1; | ||
| 113 | } XCharStruct; | 112 | } XCharStruct; |
| 114 | 113 | ||
| 115 | #define STORE_XCHARSTRUCT(xcs, w, bds) \ | 114 | #define STORE_XCHARSTRUCT(xcs, w, bds) \ |
| @@ -117,8 +116,19 @@ typedef struct _XCharStruct | |||
| 117 | (xcs).lbearing = (bds).left, \ | 116 | (xcs).lbearing = (bds).left, \ |
| 118 | (xcs).rbearing = (bds).right, \ | 117 | (xcs).rbearing = (bds).right, \ |
| 119 | (xcs).ascent = -(bds).top, \ | 118 | (xcs).ascent = -(bds).top, \ |
| 120 | (xcs).descent = (bds).bottom, \ | 119 | (xcs).descent = (bds).bottom) |
| 121 | (xcs).valid_p = 1) | 120 | |
| 121 | typedef struct | ||
| 122 | { | ||
| 123 | char valid_bits[0x100 / 8]; | ||
| 124 | XCharStruct per_char[0x100]; | ||
| 125 | } XCharStructRow; | ||
| 126 | |||
| 127 | #define XCHARSTRUCTROW_CHAR_VALID_P(row, byte2) \ | ||
| 128 | ((row)->valid_bits[(byte2) / 8] & (1 << (byte2) % 8)) | ||
| 129 | |||
| 130 | #define XCHARSTRUCTROW_SET_CHAR_VALID(row, byte2) \ | ||
| 131 | ((row)->valid_bits[(byte2) / 8] |= (1 << (byte2) % 8)) | ||
| 122 | 132 | ||
| 123 | struct MacFontStruct { | 133 | struct MacFontStruct { |
| 124 | char *full_name; | 134 | char *full_name; |
| @@ -157,7 +167,10 @@ struct MacFontStruct { | |||
| 157 | #endif /* 0 */ | 167 | #endif /* 0 */ |
| 158 | XCharStruct min_bounds; /* minimum bounds over all existing char */ | 168 | XCharStruct min_bounds; /* minimum bounds over all existing char */ |
| 159 | XCharStruct max_bounds; /* maximum bounds over all existing char */ | 169 | XCharStruct max_bounds; /* maximum bounds over all existing char */ |
| 160 | XCharStruct *per_char; /* first_char to last_char information */ | 170 | union { |
| 171 | XCharStruct *per_char; /* first_char to last_char information */ | ||
| 172 | XCharStructRow **rows; /* first row to last row information */ | ||
| 173 | } bounds; | ||
| 161 | int ascent; /* logical extent above baseline for spacing */ | 174 | int ascent; /* logical extent above baseline for spacing */ |
| 162 | int descent; /* logical decent below baseline for spacing */ | 175 | int descent; /* logical decent below baseline for spacing */ |
| 163 | }; | 176 | }; |