diff options
| author | Jason Rumney | 2001-11-10 13:51:02 +0000 |
|---|---|---|
| committer | Jason Rumney | 2001-11-10 13:51:02 +0000 |
| commit | 66895301efde9fd7a6e29cdabaa6b8e53bd705dc (patch) | |
| tree | 54372a4bf956b1e1ceb5506589f10526870f0781 /src | |
| parent | ed0d1d91c8f9ef0a7025ce757709dd45fa6c1a4f (diff) | |
| download | emacs-66895301efde9fd7a6e29cdabaa6b8e53bd705dc.tar.gz emacs-66895301efde9fd7a6e29cdabaa6b8e53bd705dc.zip | |
(enum_font_cb2): Use leading @ on face name to detect
vertical fonts. Allow them if face name is explicitly specified.
Do not give up if we find a font that cannot be converted to an
xlfd.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index def351562db..9a2a1e31661 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -6672,10 +6672,16 @@ enum_font_cb2 (lplf, lptm, FontType, lpef) | |||
| 6672 | int FontType; | 6672 | int FontType; |
| 6673 | enumfont_t * lpef; | 6673 | enumfont_t * lpef; |
| 6674 | { | 6674 | { |
| 6675 | /* Ignore struck out, underlined and vertical versions of fonts. */ | 6675 | /* Ignore struck out and underlined versions of fonts. */ |
| 6676 | if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline | 6676 | if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline) |
| 6677 | || lplf->elfLogFont.lfEscapement != 0 | 6677 | return 1; |
| 6678 | || lplf->elfLogFont.lfOrientation != 0) | 6678 | |
| 6679 | /* Only return fonts with names starting with @ if they were | ||
| 6680 | explicitly specified, since Microsoft uses an initial @ to | ||
| 6681 | denote fonts for vertical writing, without providing a more | ||
| 6682 | convenient way of identifying them. */ | ||
| 6683 | if (lplf->elfLogFont.lfFaceName[0] == '@' | ||
| 6684 | && lpef->logfont.lfFaceName[0] != '@') | ||
| 6679 | return 1; | 6685 | return 1; |
| 6680 | 6686 | ||
| 6681 | /* Check that the character set matches if it was specified */ | 6687 | /* Check that the character set matches if it was specified */ |
| @@ -6728,7 +6734,7 @@ enum_font_cb2 (lplf, lptm, FontType, lpef) | |||
| 6728 | 6734 | ||
| 6729 | /* TODO: List all relevant charsets if charset not specified. */ | 6735 | /* TODO: List all relevant charsets if charset not specified. */ |
| 6730 | if (!w32_to_x_font (&(lplf->elfLogFont), buf, 100, charset)) | 6736 | if (!w32_to_x_font (&(lplf->elfLogFont), buf, 100, charset)) |
| 6731 | return 0; | 6737 | return 1; |
| 6732 | 6738 | ||
| 6733 | if (NILP (*(lpef->pattern)) | 6739 | if (NILP (*(lpef->pattern)) |
| 6734 | || w32_font_match (buf, XSTRING (*(lpef->pattern))->data)) | 6740 | || w32_font_match (buf, XSTRING (*(lpef->pattern))->data)) |