Font Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The font used to display text.
public value class Font : IEquatable<Microsoft::Maui::Font>
public readonly struct Font : IEquatable<Microsoft.Maui.Font>
type Font = struct
Public Structure Font
Implements IEquatable(Of Font)
- Inheritance
-
Font
- Implements
Remarks
The available fonts, and the matching between Font and real displayed fonts is device-dependent.
Properties
AutoScalingEnabled | |
Default |
Gets the default font for the device. |
Family |
Gets the font family to which this font belongs. |
IsDefault |
Gets a value that tells whether this font has no attributes, belongs to the default family, and has no attributes set. |
Size |
Gets the size of the font. |
Slant | |
Weight |
Methods
Equals(Object) |
Determine if the provided Object is equivalent to the current Font. |
GetHashCode() |
Get the Hashcode for this Object. |
OfSize(String, Double, FontWeight, FontSlant, Boolean) |
Returns a Font structure with the requested font and size. |
SystemFontOfSize(Double, FontWeight, FontSlant, Boolean) |
Returns an usable font instance representing the default font, in the requested size, for the device and platform. |
SystemFontOfWeight(FontWeight, FontSlant, Boolean) | |
ToString() |
Returns a string representation of this font structure. |
WithAutoScaling(Boolean) | |
WithSize(Double) |
Returns a new font structure with the size that was specified with |
WithSlant(FontSlant) | |
WithWeight(FontWeight) | |
WithWeight(FontWeight, FontSlant) |
Operators
Equality(Font, Font) | |
Inequality(Font, Font) |
Explicit Interface Implementations
IEquatable<Font>.Equals(Font) |
Extension Methods
GetFontAttributes(Font) | |
WithAttributes(Font, FontAttributes) |
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應