mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-28 06:12:37 -06:00
342 lines
No EOL
14 KiB
C++
342 lines
No EOL
14 KiB
C++
topic "Font";
|
|
[2 $$0,0#00000000000000000000000000000000:Default]
|
|
[i448;a25;kKO9;*@(64)2 $$1,0#37138531426314131252341829483380:class]
|
|
[l288;2 $$2,0#27521748481378242620020725143825:desc]
|
|
[a83;*R6 $$3,0#31310162474203024125188417583966:caption]
|
|
[l288;i1121;b17;O9;~~~.1408;2 $$4,0#10431211400427159095818037425705:param]
|
|
[i448;a25;kKO9;*@(64)2 $$5,0#37138531426314131252341829483370:item]
|
|
[*+117 $$6,6#14700283458701402223321329925657:header]
|
|
[0 $$7,0#96390100711032703541132217272105:end]
|
|
[H6;0 $$8,0#05600065144404261032431302351956:begin]
|
|
[{_}
|
|
[ {{10000t/25b/25@3 [s0; [*@(229)4 Font]]}}&]
|
|
[s7; &]
|
|
[s1;:Font`:`:class: [@(0.0.255) class][@0 _Font_:_][@(0.0.255) private][@0 _][@3 AssignValueType
|
|
No][@0 <Font, FONT`_V, ][_^Moveable^@0 Moveable][@0 <Font>_>]&]
|
|
[s2;%% Font is a concrete class that describes the appearance of
|
|
text. It is Moveable, has cheap copy operation and is Value convertible
|
|
with rich`-Value abilities.&]
|
|
[s2;%% It is storing several attributes to describe the text. The
|
|
corresponding system font is stored in the form of face index
|
|
`- each system font has specific index value. There are some
|
|
predefined indexes for common fonts:&]
|
|
[s0;%% &]
|
|
[ {{2595:7405<256;^ [s2;l0; [* Font`::STDFONT]]
|
|
::= [s2;l0;%% Standard GUI font defined by platform. Can be altered by
|
|
Draw`::SetStdFont.]
|
|
::^ [s2;l0; [* Font`::SERIF]]
|
|
::= [s2;l0;%% Standard serif font.]
|
|
::^ [s2;l0; [* Font`::SANSSERIF]]
|
|
::= [s2;l0;%% Standard sans`-serif font.]
|
|
::^ [s2;l0; [* Font`::MONOSPACE]]
|
|
::= [s2;l0;%% Standard fixed pitch font.]}}&]
|
|
[s2;%% &]
|
|
[s2;%% Font also provides text metrics services.&]
|
|
[s7; &]
|
|
[s0; &]
|
|
[ {{10000F(128)G(128)@1 [s0;%% [* Public Member List]]}}&]
|
|
[s7; &]
|
|
[s5;:Font`:`:GetFaceCount`(`): [@(0.0.255) static][@0 ][@(0.0.255) int][@0 _GetFaceCount()]&]
|
|
[s2;%% Returns the number of face`-names available.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetFaceName`(int`): [@(0.0.255) static][@0 ][_^String^@0 String][@0 _GetFaceNam
|
|
e(][@(0.0.255) int][@0 _][@3 index][@0 )]&]
|
|
[s2;%% Returns the name of face [%-*@3 index].&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:FindFaceNameIndex`(const String`&`): [@(0.0.255) static][@0
|
|
][@(0.0.255) int][@0 _FindFaceNameIndex(][@(0.0.255) const][@0 _][_^String^@0 String][@(0.0.255) `&
|
|
][@0 _][@3 name][@0 )]&]
|
|
[s2;%% Finds the face index of face`-[%-*@3 name].&]
|
|
[s7;%% &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetFaceInfo`(int`): [@(0.0.255) static][@0 ][_^dword^@0 dword][@0 _GetFaceInfo(
|
|
][@(0.0.255) int][@0 _][@3 index][@0 )]&]
|
|
[s2;%% Returns the information about face [%-*@3 index] as combination
|
|
of binary flags:&]
|
|
[ {{2587:7413<256;^ [s0; [* Font`::FIXEDPITCH]]
|
|
::= [s0;%% Font`-face is monospaced.]
|
|
::^ [s0; [* Font`::SCALEABLE]]
|
|
::= [s0;%% Font`-face is freely scalable (it is in vector format, e.g.
|
|
Truetype).]
|
|
::^ [s0; [* Font`::SPECIAL]]
|
|
::= [s0;%% Font does not use Unicode encoding (typical for some symbol
|
|
fonts).]}}&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:SetStdFont`(Font`): [@(0.0.255) static][@0 ][@(0.0.255) void][@0 _SetStdFont(][_^Font^@0 F
|
|
ont][@0 _][@3 font][@0 )]&]
|
|
[s2;%% Sets the standard font. U`+`+ sets the standard font to match
|
|
host platform standard. This method can be used to change this
|
|
default setting.&]
|
|
[s7;%% &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetStdFont`(`): [@(0.0.255) static][@0 ][_^Font^@0 Font][@0 _GetStdFont()]&]
|
|
[s2;%% Returns the standard font.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetStdFontSize`(`): [@(0.0.255) static][@0 ][_^Size^@0 Size][@0 _GetStdFontSize
|
|
()]&]
|
|
[s2;%% Returns metrics of standard font `- height and average width
|
|
of glyphs.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetFace`(`)const: [@(0.0.255) int][@0 _GetFace()_][@(0.0.255) const]&]
|
|
[s2;%% Face index of Font.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetHeight`(`)const: [@(0.0.255) int][@0 _GetHeight()_][@(0.0.255) const]&]
|
|
[s2;%% Returns the requested height of font.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetWidth`(`)const: [@(0.0.255) int][@0 _GetWidth()_][@(0.0.255) const]&]
|
|
[s2;%% Return the width of font or 0 for default width.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetFaceName`(`)const: [_^String^@0 String][@0 _GetFaceName()]_[@(0.0.255) cons
|
|
t]&]
|
|
[s2;%% Returns the face`-name text for current instance.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetFaceInfo`(`)const: [_^dword^@0 dword][@0 _GetFaceInfo()]_[@(0.0.255) const]&]
|
|
[s2;%% Same as GetFaceInfo(GetFace()).&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:AsInt64`(`)const: [_^int64^@0 int64][@0 _AsInt64()]_[@(0.0.255) const]&]
|
|
[s2;%% Returns 64`-bit number representing the font.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Face`(int`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Face(][@(0.0.255) int][@0 _][@3 n][@0 )
|
|
]&]
|
|
[s2;%% Sets the face index.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Height`(int`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Height(][@(0.0.255) int][@0 _][@3 n
|
|
][@0 )]&]
|
|
[s2;%% Sets the font height (in pixels/dots).&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Width`(int`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Width(][@(0.0.255) int][@0 _][@3 n
|
|
][@0 )]&]
|
|
[s2;%% Sets the font width. Use 0 for default width (in pixels/dots).&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Bold`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Bold()]&]
|
|
[s5;:Font`:`:NoBold`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _NoBold()]&]
|
|
[s5;:Font`:`:Bold`(bool`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Bold(][@(0.0.255) bool][@0 _][@3 b
|
|
][@0 )]&]
|
|
[s5;:Font`:`:Italic`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Italic()]&]
|
|
[s5;:Font`:`:NoItalic`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _NoItalic()]&]
|
|
[s5;:Font`:`:Italic`(bool`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Italic(][@(0.0.255) bool][@0 _
|
|
][@3 b][@0 )]&]
|
|
[s5;:Font`:`:Underline`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Underline()]&]
|
|
[s5;:Font`:`:NoUnderline`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _NoUnderline()]&]
|
|
[s5;:Font`:`:Underline`(bool`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Underline(][@(0.0.255) bo
|
|
ol][@0 _][@3 b][@0 )]&]
|
|
[s5;:Font`:`:Strikeout`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Strikeout()]&]
|
|
[s5;:Font`:`:NoStrikeout`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _NoStrikeout()]&]
|
|
[s5;:Font`:`:Strikeout`(bool`): [_^Font^@0 Font][@(0.0.255) `&][@0 _Strikeout(][@(0.0.255) bo
|
|
ol][@0 _][@3 b][@0 )]&]
|
|
[s2; Sets or unsets bold/italic/undeline/strikeout modes.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:NonAntiAliased`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _NonAntiAliased()]&]
|
|
[s5;:Font`:`:NoNonAntiAliased`(`): [_^Font^@0 Font][@(0.0.255) `&][@0 _NoNonAntiAliased()]&]
|
|
[s5;:Font`:`:NonAntiAliased`(bool`): [_^Font^@0 Font][@(0.0.255) `&][@0 _NonAntiAliased(][@(0.0.255) b
|
|
ool][@0 _][@3 b][@0 )]&]
|
|
[s2;%% Sets/unsets non`-anti`-aliased flag. This indicates that anti`-aliasing
|
|
should not be used when painting the font.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsBold`(`)const: [@(0.0.255) bool][@0 _IsBold()_][@(0.0.255) const]&]
|
|
[s5;:Font`:`:IsItalic`(`)const: [@(0.0.255) bool][@0 _IsItalic()_][@(0.0.255) const]&]
|
|
[s5;:Font`:`:IsUnderline`(`)const: [@(0.0.255) bool][@0 _IsUnderline()_][@(0.0.255) const]&]
|
|
[s5;:Font`:`:IsStrikeout`(`)const: [@(0.0.255) bool][@0 _IsStrikeout()_][@(0.0.255) const]&]
|
|
[s2; Tests whether bold/italic/underline/strikeout is active.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsNonAntiAliased`(`)const: [@(0.0.255) bool][@0 _IsNonAntiAliased()_][@(0.0.255) c
|
|
onst]&]
|
|
[s2;%% True if NonAntiAliased is active.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:FaceName`(const String`&`): [_^Font^@0 Font][@(0.0.255) `&][@0 _FaceName(][@(0.0.255) c
|
|
onst][@0 _][_^String^@0 String][@(0.0.255) `&][@0 _][@3 name][@0 )]&]
|
|
[s2;%% Sets the face to [%-*@3 name]. If name is not valid face`-name,
|
|
Font is set to Null.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:operator`(`)`(`)const: [_^Font^@0 Font]_[@(0.0.255) operator][@0 ()()]_[@(0.0.255) c
|
|
onst]&]
|
|
[s2;%% Returns a copy of Font. Useful to simplify notation when altering
|
|
existing Font values.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:operator`(`)`(int`)const: [_^Font^@0 Font]_[@(0.0.255) operator][@0 ()(][@(0.0.255) i
|
|
nt][@0 _][@3 n][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Returns a copy of Font, with height changed to [%-*@3 n].&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Serialize`(Stream`&`): [@(0.0.255) void][@0 _Serialize(][_^Stream^@0 Stream][@(0.0.255) `&
|
|
][@0 _][@3 s][@0 )]&]
|
|
[s2;%% Serializes the font value (face index is stored as face`-name
|
|
text).&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:operator`=`=`(Font`)const: [@(0.0.255) bool][@0 _operator`=`=(][_^Font^@0 Font
|
|
][@0 _][@3 f][@0 )_][@(0.0.255) const]&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:operator`!`=`(Font`)const: [@(0.0.255) bool][@0 _operator!`=(][_^Font^@0 Font][@0 _
|
|
][@3 f][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Compares two Font instances.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetHashValue`(`)const: [_^dword^@0 dword][@0 _GetHashValue()]_[@(0.0.255) cons
|
|
t]&]
|
|
[s2;%% Returns the font hash value.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsNull`(`)const: [@(0.0.255) bool][@0 _IsNull()_][@(0.0.255) const]&]
|
|
[s2;%% True if Font is Null.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetAscent`(`)const: [@(0.0.255) int][@0 _GetAscent()_][@(0.0.255) const]&]
|
|
[s2;%% Returns the character cell extend above the baseline.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetDescent`(`)const: [@(0.0.255) int][@0 _GetDescent()_][@(0.0.255) const]&]
|
|
[s2;%% Returns the character cell extend below the baseline.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetCy`(`)const: [@(0.0.255) int][@0 _GetCy()_][@(0.0.255) const]&]
|
|
[s2;%% Same as GetDescent() `+ GetAscent().&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetExternal`(`)const: [@(0.0.255) int][@0 _GetExternal()_][@(0.0.255) const]&]
|
|
[s2;%% Returns the additional space that font description recommends
|
|
to insert between two lines of text. Rarely used.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetInternal`(`)const: [@(0.0.255) int][@0 _GetInternal()_][@(0.0.255) const]&]
|
|
[s2;%% Returns the mostly free space inside GetAscent value. Rarely
|
|
used.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetHeight`(`)const: [@(0.0.255) int][@0 _GetHeight()_][@(0.0.255) const]&]
|
|
[s2;%% Returns GetAscent() `+ GetDescent() `- the height of the line
|
|
of text.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetLineHeight`(`)const: [@(0.0.255) int][@0 _GetLineHeight()_][@(0.0.255) cons
|
|
t]&]
|
|
[s2;%% Returns GetHeight() `+ GetExternal().&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetOverhang`(`)const: [@(0.0.255) int][@0 _GetOverhang()_][@(0.0.255) const]&]
|
|
[s2;%% Returns overhang of font.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetAveWidth`(`)const: [@(0.0.255) int][@0 _GetAveWidth()_][@(0.0.255) const]&]
|
|
[s2;%% Returns the average width of character.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetMaxWidth`(`)const: [@(0.0.255) int][@0 _GetMaxWidth()_][@(0.0.255) const]&]
|
|
[s2;%% Returns the maximal width of character.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsNormal`(int`)const: [@(0.0.255) bool][@0 _IsNormal(][@(0.0.255) int][@0 _][@3 ch
|
|
][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Returns true if [%-*@3 ch] exists as regular glyph in the font.&]
|
|
[s7;%% &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsComposed`(int`)const: [@(0.0.255) bool][@0 _IsComposed(][@(0.0.255) int][@0 _][@3 c
|
|
h][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Returns true if [%-*@3 ch].is to be rendered as composition
|
|
of 2 other glyphs (ASCII letter and diacritical mark).&]
|
|
[s7;%% &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsReplaced`(int`)const: [@(0.0.255) bool][@0 _IsReplaced(][@(0.0.255) int][@0 _][@3 c
|
|
h][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Returns true [%-*@3 ch] is to be rendered using character from
|
|
some other font.&]
|
|
[s7;%% &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsMissing`(int`)const: [@(0.0.255) bool][@0 _IsMissing(][@(0.0.255) int][@0 _][@3 c
|
|
h][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Returns true if [%-*@3 ch] cannot be rendered.&]
|
|
[s7;%% &]
|
|
[s8; &]
|
|
[s5;:Font`:`:HasChar`(int`)const: [@(0.0.255) int][@0 _HasChar(][@(0.0.255) int][@0 _][@3 ch][@0 )
|
|
_][@(0.0.255) const]&]
|
|
[s2;%% Returns true if [%-*@3 ch] can be rendered (in any way).&]
|
|
[s7;%% &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetWidth`(int`)const: [@(0.0.255) int][@0 _GetWidth(][@(0.0.255) int][@0 _][@3 c][@0 )
|
|
_][@(0.0.255) const]&]
|
|
[s2;%% Returns the total advance with of character [%-*@3 c] (encoded
|
|
in unicode).&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:operator`[`]`(int`)const: [@(0.0.255) int][@0 _operator`[`](][@(0.0.255) int][@0 _
|
|
][@3 c][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Same as GetWidth([%-*@3 c]).&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetLeftSpace`(int`)const: [@(0.0.255) int][@0 _GetLeftSpace(][@(0.0.255) int][@0 _
|
|
][@3 c][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Describes the relation of left side of character cell and
|
|
leftmost area painted for character [%-*@3 c]. Negative value means
|
|
that character extends character cell, positive value means that
|
|
there is a space inside the cell not used for glyph.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetRightSpace`(int`)const: [@(0.0.255) int][@0 _GetRightSpace(][@(0.0.255) int
|
|
][@0 _][@3 c][@0 )_][@(0.0.255) const]&]
|
|
[s2;%% Similar to GetLeftSpace for the right edge of character cell.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsFixedPitch`(`)const: [@(0.0.255) bool][@0 _IsFixedPitch()_][@(0.0.255) const
|
|
]&]
|
|
[s2;%% True if font is mono`-spaced.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsScaleable`(`)const: [@(0.0.255) bool][@0 _IsScaleable()_][@(0.0.255) const]&]
|
|
[s2;%% True if font is freely scaleable.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:IsSpecial`(`)const: [@(0.0.255) bool][@0 _IsSpecial()_][@(0.0.255) const]&]
|
|
[s2;%% Returns true if font does not use unicode placement of glyphs,
|
|
for example some symbol fonts have this issue.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:GetPath`(`)const: [_^String^@0 String][@0 _GetPath()]_[@(0.0.255) const]&]
|
|
[s2;%% [/ POSIX specific:] Returns the path of font file.&]
|
|
[s0; &]
|
|
[ {{10000t/25b/25@1 [s0; [* Constructor Detail]]}}&]
|
|
[s7; &]
|
|
[s8;H0; &]
|
|
[s5;:Font`:`:Font`(`): [@0 Font()]&]
|
|
[s2;%% Initializes Font to STDFONT, default height, all attributes
|
|
not active.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Font`(int`,int`): [@0 Font(][@(0.0.255) int][@0 _][@3 face][@0 ,
|
|
][@(0.0.255) int][@0 _][@3 height][@0 )]&]
|
|
[s2;%% Initializes font to [%-*@3 face] index and [%-*@3 height].&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Font`(const Nuller`&`): [@0 Font(][@(0.0.255) const][@0 _][_^Nuller^@0 Nuller][@(0.0.255) `&
|
|
][@0 )]&]
|
|
[s2;%% Sets the font Null.&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:operator Value`(`)const: [@0 operator_Value()]_[@(0.0.255) const]&]
|
|
[s2;%% Converts the Font to the Value (font is rich Value).&]
|
|
[s7; &]
|
|
[s8; &]
|
|
[s5;:Font`:`:Font`(const Value`&`): [@0 Font(][@(0.0.255) const][@0 _][_^Value^@0 Value][@(0.0.255) `&
|
|
][@0 _][@3 q][@0 )]&]
|
|
[s2;%% Converts the Value to the Font.&]
|
|
[s0; ] |