1334 |
int x, y0, y1; |
int x, y0, y1; |
1335 |
{ |
{ |
1336 |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
1337 |
|
struct face *face; |
1338 |
|
|
1339 |
|
face = FACE_FROM_ID (f, VERTICAL_BORDER_FACE_ID); |
1340 |
|
if (face) |
1341 |
|
XSetForeground (FRAME_MAC_DISPLAY (f), f->output_data.mac->normal_gc, |
1342 |
|
face->foreground); |
1343 |
|
|
1344 |
XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
1345 |
f->output_data.mac->normal_gc, x, y0, x, y1); |
f->output_data.mac->normal_gc, x, y0, x, y1); |
1727 |
/* It's a program. */ |
/* It's a program. */ |
1728 |
struct ccl_program *ccl = font_info->font_encoder; |
struct ccl_program *ccl = font_info->font_encoder; |
1729 |
|
|
1730 |
|
check_ccl_update (ccl); |
1731 |
if (CHARSET_DIMENSION (charset) == 1) |
if (CHARSET_DIMENSION (charset) == 1) |
1732 |
{ |
{ |
1733 |
ccl->reg[0] = charset; |
ccl->reg[0] = charset; |
1734 |
ccl->reg[1] = char2b->byte2; |
ccl->reg[1] = char2b->byte2; |
1735 |
|
ccl->reg[2] = -1; |
1736 |
} |
} |
1737 |
else |
else |
1738 |
{ |
{ |
6257 |
Style style; |
Style style; |
6258 |
char *charset; |
char *charset; |
6259 |
{ |
{ |
6260 |
char foundry[32], family[32], cs[32]; |
Str31 foundry, cs; |
6261 |
|
Str255 family; |
6262 |
char xf[256], *result, *p; |
char xf[256], *result, *p; |
6263 |
|
|
6264 |
if (sscanf (name, "%31[^-]-%31[^-]-%31s", foundry, family, cs) == 3) |
if (sscanf (name, "%31[^-]-%255[^-]-%31s", foundry, family, cs) == 3) |
6265 |
charset = cs; |
charset = cs; |
6266 |
else |
else |
6267 |
{ |
{ |
6269 |
strcpy(family, name); |
strcpy(family, name); |
6270 |
} |
} |
6271 |
|
|
6272 |
sprintf(xf, "-%s-%s-%s-%c-normal--%d-%d-%d-%d-m-%d-%s", |
sprintf (xf, "%s-%c-normal--%d-%d-%d-%d-m-%d-%s", |
6273 |
foundry, family, style & bold ? "bold" : "medium", |
style & bold ? "bold" : "medium", style & italic ? 'i' : 'r', |
6274 |
style & italic ? 'i' : 'r', size, size * 10, |
size, size * 10, size ? 75 : 0, size ? 75 : 0, size * 10, charset); |
|
size ? 75 : 0, size ? 75 : 0, size * 10, charset); |
|
6275 |
|
|
6276 |
result = (char *) xmalloc (strlen (xf) + 1); |
result = xmalloc (strlen (foundry) + strlen (family) + strlen (xf) + 3 + 1); |
6277 |
strcpy (result, xf); |
sprintf (result, "-%s-%s-%s", foundry, family, xf); |
6278 |
for (p = result; *p; p++) |
for (p = result; *p; p++) |
6279 |
*p = tolower(*p); |
*p = tolower(*p); |
6280 |
return result; |
return result; |
6294 |
Style *style; |
Style *style; |
6295 |
char *cs; |
char *cs; |
6296 |
{ |
{ |
6297 |
char foundry[32], family[32], weight[20], slant[2], *p; |
Str31 foundry; |
6298 |
|
Str255 family; |
6299 |
|
char weight[20], slant[2], *p; |
6300 |
Lisp_Object charset_info, coding_system = Qnil; |
Lisp_Object charset_info, coding_system = Qnil; |
6301 |
struct coding_system coding; |
struct coding_system coding; |
6302 |
|
|
6303 |
strcpy (mf, ""); |
strcpy (mf, ""); |
6304 |
|
|
6305 |
if (sscanf (xf, "-%31[^-]-%31[^-]-%19[^-]-%1[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s", |
if (sscanf (xf, "-%31[^-]-%255[^-]-%19[^-]-%1[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s", |
6306 |
foundry, family, weight, slant, cs) != 5 && |
foundry, family, weight, slant, cs) != 5 && |
6307 |
sscanf (xf, "-%31[^-]-%31[^-]-%19[^-]-%1[^-]-%*[^-]--%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s", |
sscanf (xf, "-%31[^-]-%255[^-]-%19[^-]-%1[^-]-%*[^-]--%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s", |
6308 |
foundry, family, weight, slant, cs) != 5) |
foundry, family, weight, slant, cs) != 5) |
6309 |
return; |
return; |
6310 |
|
|
6337 |
coding.dst_multibyte = 1; |
coding.dst_multibyte = 1; |
6338 |
coding.mode |= CODING_MODE_LAST_BLOCK; |
coding.mode |= CODING_MODE_LAST_BLOCK; |
6339 |
encode_coding (&coding, mf_decoded, mf, |
encode_coding (&coding, mf_decoded, mf, |
6340 |
strlen (mf_decoded), sizeof (Str32) - 1); |
strlen (mf_decoded), sizeof (Str255) - 1); |
6341 |
mf[coding.produced] = '\0'; |
mf[coding.produced] = '\0'; |
6342 |
} |
} |
6343 |
} |
} |
6469 |
Handle font_handle, font_handle_2; |
Handle font_handle, font_handle_2; |
6470 |
short id, scriptcode; |
short id, scriptcode; |
6471 |
ResType type; |
ResType type; |
6472 |
Str32 name; |
Str255 name; |
6473 |
struct FontAssoc *fat; |
struct FontAssoc *fat; |
6474 |
struct AsscEntry *assc_entry; |
struct AsscEntry *assc_entry; |
6475 |
Lisp_Object text_encoding_info_alist, text_encoding_info; |
Lisp_Object text_encoding_info_alist, text_encoding_info; |
6608 |
int i, n_fonts = 0; |
int i, n_fonts = 0; |
6609 |
Lisp_Object font_list = Qnil, pattern_regex, fontname; |
Lisp_Object font_list = Qnil, pattern_regex, fontname; |
6610 |
char *regex = (char *) alloca (strlen (pattern) * 2 + 3); |
char *regex = (char *) alloca (strlen (pattern) * 2 + 3); |
6611 |
char scaled[256]; |
char *scaled, *ptr; |
|
char *ptr; |
|
6612 |
int scl_val[XLFD_SCL_LAST], *field, *val; |
int scl_val[XLFD_SCL_LAST], *field, *val; |
6613 |
char *longest_start, *cur_start, *nonspecial; |
char *longest_start, *cur_start, *nonspecial; |
6614 |
int longest_len, exact; |
int longest_len, exact; |
6732 |
{ |
{ |
6733 |
int former_len = ptr - font_name_table[i]; |
int former_len = ptr - font_name_table[i]; |
6734 |
|
|
6735 |
|
scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1); |
6736 |
memcpy (scaled, font_name_table[i], former_len); |
memcpy (scaled, font_name_table[i], former_len); |
6737 |
sprintf (scaled + former_len, |
sprintf (scaled + former_len, |
6738 |
"-%d-%d-75-75-m-%d-%s", |
"-%d-%d-75-75-m-%d-%s", |
6742 |
ptr + sizeof ("-0-0-0-0-m-0-") - 1); |
ptr + sizeof ("-0-0-0-0-m-0-") - 1); |
6743 |
fontname = mac_c_string_match (pattern_regex, scaled, |
fontname = mac_c_string_match (pattern_regex, scaled, |
6744 |
nonspecial, exact); |
nonspecial, exact); |
6745 |
|
xfree (scaled); |
6746 |
if (!NILP (fontname)) |
if (!NILP (fontname)) |
6747 |
{ |
{ |
6748 |
font_list = Fcons (fontname, font_list); |
font_list = Fcons (fontname, font_list); |
6863 |
the values computed. Value is non-zero if smallest_font_height or |
the values computed. Value is non-zero if smallest_font_height or |
6864 |
smallest_char_width become smaller than they were before. */ |
smallest_char_width become smaller than they were before. */ |
6865 |
|
|
6866 |
int |
static int |
6867 |
x_compute_min_glyph_bounds (f) |
x_compute_min_glyph_bounds (f) |
6868 |
struct frame *f; |
struct frame *f; |
6869 |
{ |
{ |
6948 |
GrafPtr port; |
GrafPtr port; |
6949 |
SInt16 old_fontnum, old_fontsize; |
SInt16 old_fontnum, old_fontsize; |
6950 |
Style old_fontface; |
Style old_fontface; |
6951 |
Str32 mfontname, mfontname_decoded, charset; |
Str255 mfontname, mfontname_decoded; |
6952 |
|
Str31 charset; |
6953 |
SInt16 fontnum; |
SInt16 fontnum; |
6954 |
Style fontface; |
Style fontface; |
6955 |
#if TARGET_API_MAC_CARBON |
#if TARGET_API_MAC_CARBON |
7341 |
before, or if the font loaded has a smalle>r height than any |
before, or if the font loaded has a smalle>r height than any |
7342 |
other font loaded before. If this happens, it will make a |
other font loaded before. If this happens, it will make a |
7343 |
glyph matrix reallocation necessary. */ |
glyph matrix reallocation necessary. */ |
7344 |
fonts_changed_p = x_compute_min_glyph_bounds (f); |
fonts_changed_p |= x_compute_min_glyph_bounds (f); |
7345 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
7346 |
return fontp; |
return fontp; |
7347 |
} |
} |