@FIRSTFONT
— Returns the
name of the first matching font.
Syntax:
%@FIRSTFONT[
name,
charset,
type,
pitch-and-family]
name | may contain wildcards |
charset | see below |
type | one of: R raster fonts, V vector fonts, O OpenType fonts, or T TrueType fonts |
pitch-and-family | one of: R Roman, S Swiss, M modern, H hand (script), D decorative, or N no family; |
and/or one of: F fixed pitch, or V variable pitch |
If no matching font is found, @FIRSTFONT
returns an empty
string. If a matching font is found, its name is returned, and you can continue
enumerating fonts with @NEXTFONT
.
Supported charset values include:
0 | ANSI (Western — the default) |
1 | don’t care |
2 | symbol |
128 | Shift JIS (Japanese) |
129 | Hangul (Korean) |
130 | Johab (Korean) |
134 | GB 2312 (simplified Chinese) |
136 | Big-5 (traditional Chinese) |
161 | Greek |
162 | Turkish |
163 | Vietnamese |
177 | Hebrew |
178 | Arabic |
186 | Baltic |
204 | Cyrillic (Russian) |
222 | Thai |
238 | Eastern Europe |
255 | OEM character set |
rem List available script fonts:
set font=%@firstfont[,,,h]
do while defined font
echo %font
set font=%@nextfont[]
enddo