• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/tcl-105/tk84/tk/win/

Lines Matching +defs:font +defs:size

5  *	font package interface.
21 * The following structure represents a font family. It is assumed that
22 * all screen fonts constructed from the same "font family" share certain
23 * properties; all screen fonts with the same "font family" point to a
25 * is the character existence metrics, used to determine if a screen font
28 * Under Windows, a "font family" is uniquely identified by its face name.
37 struct FontFamily *nextPtr; /* Next in list of all known font families. */
51 Tcl_Encoding encoding; /* Encoding for this font family. */
52 int isSymbolFont; /* Non-zero if this is a symbol font. */
53 int isWideFont; /* 1 if this is a double-byte font, 0
58 * encoding of this font. */
62 * encoding of this font. */
71 * representing whether this font can be used
78 * Cached Truetype font info.
82 USHORT *startCount; /* Truetype information about the font, */
83 USHORT *endCount; /* indicating which characters this font
91 * The following structure encapsulates an individual screen font. A font
97 char **fontMap; /* Pointer to font map from the FontFamily,
99 HFONT hFont; /* The specific screen font that will be
106 * The following structure represents Windows' implementation of a font
114 TkFont font; /* Stuff used by generic font package. Must
122 * encountered by this font so far. All fonts
124 * AllocFont() from the original set of font
130 * this font, used for getting HDC for
132 int pixelSize; /* Original pixel size used when font was
135 * font, for handling common case. The base
136 * font is always used to draw characters
141 * The following structure is passed as the LPARAM when calling the font
142 * enumeration procedure to determine if a font can support the given
171 FontFamily *fontFamilyList; /* The list of font families that are
175 * exist in each font family. */
272 * Map a platform-specific native font name to a TkFont.
276 * native font. If a native font by the given name could not be
281 * call TkpDeleteFont() when the font is no longer needed.
295 Tk_Window tkwin, /* For display where font will be used. */
296 CONST char *name) /* Platform-specific font name. */
319 * Given a desired set of attributes for a font, find a font with
324 * font with the desired attributes. If a font with the desired
325 * attributes could not be constructed, some other font will be
331 * specific data when the font is no longer needed.
348 * font; the existing contents of the font
351 Tk_Window tkwin, /* For display where font will be used. */
370 * Algorithm to get the closest font name to the one requested.
408 hFont = GetScreenFont(faPtr, faceName, TkFontGetPixels(tkwin, faPtr->size));
426 * Called to release a font allocated by TkpGetNativeFont() or
442 TkFont *tkFontPtr) /* Token of font to be deleted. */
456 * Return information about the font families that are available
461 * font families.
485 * font names. If we used the ANSI version on a non-internationalized
486 * version of NT, we would get font names with '?' replacing all
509 ENUMLOGFONT *lfPtr, /* Logical-font data. */
510 NEWTEXTMETRIC *tmPtr, /* Physical-font data (not used). */
511 int fontType, /* Type of font (not used). */
536 * screen fonts that make up a font object.
540 * names of the screen fonts that make up the given font object.
620 SIZE size;
643 * represented by a single screen font.
644 * 2. Convert those chars to the encoding of that font.
659 size.cx = 0;
663 &size);
665 if (maxLength >= 0 && (curX+size.cx) > maxLength) {
669 curX += size.cx;
688 size.cx = 0;
692 &size);
694 if (maxLength >= 0 && (curX+size.cx) > maxLength) {
697 curX += size.cx;
722 size.cx = 0;
726 &size);
727 if ((curX+size.cx) > maxLength) {
730 lastSize = size.cx;
753 curX += size.cx;
824 * must be the same as font used in GC. */
840 fontPtr = (WinFont *) gc->font;
864 SIZE size;
889 GetTextExtentPoint(dcMem, source, numBytes, &size);
891 size.cx -= tm.tmOverhang;
892 bitmap = CreateCompatibleBitmap(dc, size.cx, size.cy);
899 * Both the foreground and background bits of the font are ANDed with
903 PatBlt(dcMem, 0, 0, size.cx, size.cy, BLACKNESS);
905 BitBlt(dc, x, y - tm.tmAscent, size.cx, size.cy, dcMem,
907 PatBlt(dcMem, 0, 0, size.cx, size.cy, WHITENESS);
909 BitBlt(dc, x, y - tm.tmAscent, size.cx, size.cy, dcMem,
930 SIZE size;
943 GetTextExtentPoint(dcMem, source, numBytes, &size);
945 size.cx -= tm.tmOverhang;
946 bitmap = CreateCompatibleBitmap(dc, size.cx, size.cy);
950 BitBlt(dc, x, y - tm.tmAscent, size.cx, size.cy, dcMem,
997 SIZE size;
1024 &size);
1025 x += size.cx;
1072 Tk_Window tkwin, /* Main window of interp in which font will
1074 HFONT hFont, /* Windows token for font. */
1076 * to allocate this font. For some reason,
1102 * Use the NT-only Unicode version of GetTextFace to get the font's
1104 * version of NT, we would get a font name with '?' replacing all
1122 fontPtr->font.fid = (Font) fontPtr;
1124 faPtr = &fontPtr->font.fa;
1126 faPtr->size = TkFontGetPoints(tkwin, -(tm.tmHeight - tm.tmInternalLeading));
1132 fmPtr = &fontPtr->font.fm;
1165 * font itself.
1178 WinFont *fontPtr) /* The font to delete. */
1196 * Wrap a screen font and load the FontFamily that represents
1198 * from UTF-8 to the charset of the font.
1201 * The subFontPtr is filled with information about the font.
1211 HDC hdc, /* HDC in which font can be selected. */
1212 HFONT hFont, /* The screen font. */
1214 * as the base font for a font object. */
1255 * Find the FontFamily structure associated with the given font
1260 * Cannot use the string name used to construct the font as the
1262 * use the face name actually retrieved from the font metrics as
1272 * A new FontFamily structure will be allocated if this font family
1281 HDC hdc, /* HDC in which font can be selected. */
1282 HFONT hFont, /* Screen font whose FontFamily is to be
1284 int base) /* Non-zero if this font family is to be
1285 * used in the base font of a font object. */
1341 * (GREEK CAPITAL GAMMA), because the Symbol font doesn't have a
1343 * Symbol font using the Unicode encoding, it would decide that
1344 * the Symbol font has no GREEK CAPITAL GAMMA, because the Symbol
1348 * font has a GREEK CAPITAL GAMMA, it will be found in the correct
1447 * Determine which screen font is necessary to use to display the
1448 * given character. If the font object does not have a screen font
1449 * that can display the character, another screen font may be loaded
1450 * into the font object, following a set of preferred fallback rules.
1466 WinFont *fontPtr, /* The font object with which the character
1499 aliases = TkFontGetAliasList(fontPtr->font.fa.family);
1505 if (strcasecmp(fallbackName, fontPtr->font.fa.family) == 0) {
1507 * If the base font has a fallback...
1513 * Or if an alias for the base font has a fallback...
1580 * No font can display this character. We will use the base font
1593 ENUMLOGFONT *lfPtr, /* Logical-font data. */
1594 NEWTEXTMETRIC *tmPtr, /* Physical-font data (not used). */
1595 int fontType, /* Type of font (not used). */
1636 * See if the screen font can display the given character.
1639 * The return value is 0 if the screen font cannot display the
1643 * New pages are added to the font mapping cache whenever the
1654 SubFont *subFontPtr, /* Contains font mapping cache to be queried
1674 * Tell the font mapping cache that the given screen font should be
1676 * font on the system can be be found that can display that
1677 * character; we lie to the font and tell it that it can display
1685 * New pages are added to the font mapping cache whenever the
1696 SubFont *subFontPtr, /* Contains font mapping cache to be
1731 SubFont *subFontPtr, /* Contains font mapping cache to be
1752 * what characters actually exist in this font.
1774 * Assume that a symbol font with a known encoding has all the
1784 * the proper Unicode -> symbol font mapping, we can install the
1785 * symbol font as the base font and access its glyphs.
1809 * can be used to construct a screen font that can display the
1825 HDC hdc, /* HDC in which font can be selected. */
1826 WinFont *fontPtr, /* The font object that will own the new
1827 * screen font. */
1828 char *faceName, /* Desired face name for new screen font. */
1830 * screen font must be able to display. */
1834 * trying to find a suitable screen font. */
1870 * face name when looking for a screen font that can support some
1909 * If the specified screen font has not already been loaded into
1910 * the font object, determine if it can display the given character.
1914 * by the font object. This SubFont can be used to display the given
1915 * character. The SubFont represents the screen font with the base set
1916 * of font attributes from the font object, but using the specified
1917 * font name. NULL is returned if the font object already holds
1918 * a reference to the specified physical font or if the specified
1919 * physical font cannot display the given character.
1922 * The font object's subFontArray is updated to contain a reference
1930 HDC hdc, /* HDC in which font can be selected. */
1931 WinFont *fontPtr, /* The font object that will own the new
1932 * screen font. */
1933 char *faceName, /* Desired face name for new screen font. */
1935 * screen font must be able to display. */
1958 * Load this font and see if it has the desired character.
1961 hFont = GetScreenFont(&fontPtr->font.fa, faceName, fontPtr->pixelSize);
1966 * Don't use a symbol font as a fallback font for characters below
2007 * The screen font that corresponds to the attributes.
2018 /* Desired font attributes for new HFONT. */
2019 CONST char *faceName, /* Overrides font family specified in font
2021 int pixelSize) /* Overrides size specified in font
2081 * Determines if any physical screen font exists on the system with
2083 * possible to construct some physical screen font with that family
2087 * The return value is 0 if the specified font family does not exist,
2098 HDC hdc, /* HDC in which font family will be used. */
2164 ENUMLOGFONT *lfPtr, /* Logical-font data. */
2165 NEWTEXTMETRIC *tmPtr, /* Physical-font data (not used). */
2166 int fontType, /* Type of font (not used). */
2174 * The following data structures are used when querying a TrueType font file
2175 * to determine which characters the font supports.
2190 USHORT encoding; /* How characters in font are encoded.
2284 * this font can display.
2287 * If the font has no Unicode character information, the return value
2302 HDC hdc, /* HDC into which font can be selected. */
2392 * Empirically determined: When a symbol font is
2395 * of the symbol font is from 0020 to 00FE, then the
2397 * a symbol font, we must fix the character existence
2416 * Bitmap font. We should also support ranges for the other
2439 * Helper functions to convert the data loaded from TrueType font