Commit 06505fd8 authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu
Browse files

(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.
parent 26ab4ea8
......@@ -109,7 +109,6 @@ typedef struct _XCharStruct
#if 0
unsigned short attributes; /* per char flags (not predefined) */
#endif
unsigned valid_p : 1;
} XCharStruct;
#define STORE_XCHARSTRUCT(xcs, w, bds) \
......@@ -117,8 +116,19 @@ typedef struct _XCharStruct
(xcs).lbearing = (bds).left, \
(xcs).rbearing = (bds).right, \
(xcs).ascent = -(bds).top, \
(xcs).descent = (bds).bottom, \
(xcs).valid_p = 1)
(xcs).descent = (bds).bottom)
typedef struct
{
char valid_bits[0x100 / 8];
XCharStruct per_char[0x100];
} XCharStructRow;
#define XCHARSTRUCTROW_CHAR_VALID_P(row, byte2) \
((row)->valid_bits[(byte2) / 8] & (1 << (byte2) % 8))
#define XCHARSTRUCTROW_SET_CHAR_VALID(row, byte2) \
((row)->valid_bits[(byte2) / 8] |= (1 << (byte2) % 8))
struct MacFontStruct {
char *full_name;
......@@ -157,7 +167,10 @@ struct MacFontStruct {
#endif /* 0 */
XCharStruct min_bounds; /* minimum bounds over all existing char */
XCharStruct max_bounds; /* maximum bounds over all existing char */
XCharStruct *per_char; /* first_char to last_char information */
union {
XCharStruct *per_char; /* first_char to last_char information */
XCharStructRow **rows; /* first row to last row information */
} bounds;
int ascent; /* logical extent above baseline for spacing */
int descent; /* logical decent below baseline for spacing */
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment