comparison src/w32fns.c @ 40873:f288d1d604a7

(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.
author Jason Rumney <jasonr@gnu.org>
date Sat, 10 Nov 2001 13:51:02 +0000
parents cdfd4d09b79a
children fb970d0c56eb
comparison
equal deleted inserted replaced
40872:83db614759e5 40873:f288d1d604a7
6670 ENUMLOGFONT * lplf; 6670 ENUMLOGFONT * lplf;
6671 NEWTEXTMETRIC * lptm; 6671 NEWTEXTMETRIC * lptm;
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 */
6682 if (lpef->logfont.lfCharSet != DEFAULT_CHARSET && 6688 if (lpef->logfont.lfCharSet != DEFAULT_CHARSET &&
6683 lplf->elfLogFont.lfCharSet != lpef->logfont.lfCharSet) 6689 lplf->elfLogFont.lfCharSet != lpef->logfont.lfCharSet)
6726 charset = NULL; 6732 charset = NULL;
6727 } 6733 }
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))
6735 { 6741 {
6736 *lpef->tail = Fcons (Fcons (build_string (buf), width), Qnil); 6742 *lpef->tail = Fcons (Fcons (build_string (buf), width), Qnil);