mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-25 14:11:48 +01:00
docs: expand documentation for FontNo with TTC index details
This commit is contained in:
parent
8ab99a0a91
commit
c55e47ee4d
4 changed files with 42 additions and 7 deletions
|
|
@ -130,7 +130,8 @@ public enum DalamudAsset
|
|||
[DalamudAsset(DalamudAssetPurpose.Font)]
|
||||
[DalamudAssetPath("UIRes", "NotoSansCJK-Medium.ttc")]
|
||||
NotoSansCJKMedium = 2000,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="DalamudAssetPurpose.TextureFromPng"/>: Atlas containing badges.
|
||||
/// </summary>
|
||||
[DalamudAsset(DalamudAssetPurpose.TextureFromPng)]
|
||||
|
|
|
|||
|
|
@ -25,8 +25,26 @@ public interface IFontSpec
|
|||
float LineHeightPx { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the font no.
|
||||
/// Gets or sets the font face index within a TrueType Collection (TTC) file.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This property only applies to <see cref="DalamudAsset.NotoSansCJKRegular"/> and
|
||||
/// <see cref="DalamudAsset.NotoSansCJKMedium"/>, which are TTC fonts bundling
|
||||
/// multiple language-specific CJK glyph sets (Japanese, Traditional Chinese,
|
||||
/// Simplified Chinese, Korean) into a single file.
|
||||
///
|
||||
/// The index corresponds to the font face order in the TTC:
|
||||
/// <list type="bullet">
|
||||
/// <item><description>0 = Japanese</description></item>
|
||||
/// <item><description>1 = Traditional Chinese</description></item>
|
||||
/// <item><description>2 = Simplified Chinese</description></item>
|
||||
/// <item><description>3 = Korean</description></item>
|
||||
/// </list>
|
||||
///
|
||||
/// This value is ignored for all other <see cref="DalamudAsset"/> entries.
|
||||
/// Only one glyph set can be active at a time. In most cases, you can omit this—
|
||||
/// Dalamud automatically selects the appropriate face based on the UI language.
|
||||
/// </remarks>
|
||||
int FontNo { get; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -65,9 +65,7 @@ public record SingleFontSpec : IFontSpec
|
|||
[JsonProperty]
|
||||
public ushort[]? GlyphRanges { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the font no.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
[JsonProperty]
|
||||
public int FontNo { get; init; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Numerics;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
|
|
@ -48,8 +48,26 @@ public struct SafeFontConfig
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index of font within a TTF/OTF file.
|
||||
/// Gets or sets the font face index within a TrueType Collection (TTC) file.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This property only applies to <see cref="DalamudAsset.NotoSansCJKRegular"/> and
|
||||
/// <see cref="DalamudAsset.NotoSansCJKMedium"/>, which are TTC fonts bundling
|
||||
/// multiple language-specific CJK glyph sets (Japanese, Traditional Chinese,
|
||||
/// Simplified Chinese, Korean) into a single file.
|
||||
///
|
||||
/// The index corresponds to the font face order in the TTC:
|
||||
/// <list type="bullet">
|
||||
/// <item><description>0 = Japanese</description></item>
|
||||
/// <item><description>1 = Traditional Chinese</description></item>
|
||||
/// <item><description>2 = Simplified Chinese</description></item>
|
||||
/// <item><description>3 = Korean</description></item>
|
||||
/// </list>
|
||||
///
|
||||
/// This value is ignored for all other <see cref="DalamudAsset"/> entries.
|
||||
/// Only one glyph set can be active at a time. In most cases, you can omit this—
|
||||
/// Dalamud automatically selects the appropriate face based on the UI language.
|
||||
/// </remarks>
|
||||
public int FontNo
|
||||
{
|
||||
get => this.Raw.FontNo;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue