mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Add xmldoc for TextProcessing (#1980)
This commit is contained in:
parent
844b04faad
commit
3e86764748
6 changed files with 129 additions and 74 deletions
|
|
@ -6,7 +6,7 @@ using Lumina.Data;
|
|||
|
||||
namespace Dalamud.Interface.Internal.ImGuiSeStringRenderer;
|
||||
|
||||
/// <summary>Reference member view of a .gfd file data.</summary>
|
||||
/// <summary>Game font data file.</summary>
|
||||
internal sealed unsafe class GfdFile : FileResource
|
||||
{
|
||||
/// <summary>Gets or sets the file header.</summary>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ internal static class UnicodeData
|
|||
EmojiProperty =
|
||||
Parse(
|
||||
typeof(UnicodeData).Assembly.GetManifestResourceStream("emoji-data.txt")!,
|
||||
UnicodeEmojiProperty.Emoji);
|
||||
default(UnicodeEmojiProperty));
|
||||
}
|
||||
|
||||
private static T[] Parse<T>(Stream stream, T defaultValue)
|
||||
|
|
@ -94,8 +94,8 @@ internal static class UnicodeData
|
|||
if (from > char.MaxValue)
|
||||
continue;
|
||||
|
||||
from = Math.Min(from, char.MaxValue);
|
||||
to = Math.Min(to, char.MaxValue);
|
||||
from = Math.Min(from, res.Length);
|
||||
to = Math.Min(to, res.Length);
|
||||
if (isFlag)
|
||||
{
|
||||
foreach (ref var v in res.AsSpan()[from..to])
|
||||
|
|
|
|||
|
|
@ -2,21 +2,25 @@ using System.Diagnostics.CodeAnalysis;
|
|||
|
||||
namespace Dalamud.Interface.Internal.ImGuiSeStringRenderer.TextProcessing;
|
||||
|
||||
/// <summary><a href="https://www.unicode.org/reports/tr11/">Unicode east asian width</a>.</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1600:Elements should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1602:Enumeration items should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
internal enum UnicodeEastAsianWidthClass : byte
|
||||
{
|
||||
A = 0,
|
||||
F = 1,
|
||||
H = 2,
|
||||
N = 3,
|
||||
Na = 4,
|
||||
W = 5,
|
||||
/// <summary>East Asian Ambiguous.</summary>
|
||||
A,
|
||||
|
||||
/// <summary>East Asian Fullwidth.</summary>
|
||||
F,
|
||||
|
||||
/// <summary>East Asian Halfwidth.</summary>
|
||||
H,
|
||||
|
||||
/// <summary>Neutral.</summary>
|
||||
N,
|
||||
|
||||
/// <summary>East Asian Narrow.</summary>
|
||||
Na,
|
||||
|
||||
/// <summary>East Asian Wide.</summary>
|
||||
W,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,22 +2,27 @@ using System.Diagnostics.CodeAnalysis;
|
|||
|
||||
namespace Dalamud.Interface.Internal.ImGuiSeStringRenderer.TextProcessing;
|
||||
|
||||
/// <summary><a href="https://www.unicode.org/reports/tr51/#Emoji_Characters">Unicode emoji property</a>.</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1600:Elements should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1602:Enumeration items should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
[Flags]
|
||||
internal enum UnicodeEmojiProperty : byte
|
||||
{
|
||||
/// <summary>Characters that are emoji.</summary>
|
||||
Emoji = 1 << 0,
|
||||
|
||||
/// <summary>Characters that have emoji presentation by default.</summary>
|
||||
Emoji_Presentation = 1 << 1,
|
||||
Emoji_Modifier_Base = 1 << 2,
|
||||
Emoji_Modifier = 1 << 3,
|
||||
|
||||
/// <summary>Characters that are emoji modifiers.</summary>
|
||||
Emoji_Modifier = 1 << 2,
|
||||
|
||||
/// <summary>Characters that can serve as a base for emoji modifiers.</summary>
|
||||
Emoji_Modifier_Base = 1 << 3,
|
||||
|
||||
/// <summary>Characters used in emoji sequences that normally do not appear on emoji keyboards as separate choices,
|
||||
/// such as keycap base characters or Regional_Indicator characters.</summary>
|
||||
Emoji_Component = 1 << 4,
|
||||
|
||||
/// <summary>Characters that are used to future-proof segmentation.</summary>
|
||||
Extended_Pictographic = 1 << 5,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,45 +2,98 @@ using System.Diagnostics.CodeAnalysis;
|
|||
|
||||
namespace Dalamud.Interface.Internal.ImGuiSeStringRenderer.TextProcessing;
|
||||
|
||||
/// <summary><a href="https://www.unicode.org/reports/tr44/#General_Category_Values">Unicode general category.</a>.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1600:Elements should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1602:Enumeration items should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
internal enum UnicodeGeneralCategory : byte
|
||||
{
|
||||
Cn = 0,
|
||||
Lu = 1,
|
||||
Ll = 2,
|
||||
Lt = 3,
|
||||
Lm = 4,
|
||||
Lo = 5,
|
||||
Mn = 6,
|
||||
Me = 7,
|
||||
Mc = 8,
|
||||
Nd = 9,
|
||||
Nl = 10,
|
||||
No = 11,
|
||||
Zs = 12,
|
||||
Zl = 13,
|
||||
Zp = 14,
|
||||
Cc = 15,
|
||||
Cf = 16,
|
||||
Co = 17,
|
||||
Cs = 18,
|
||||
Pd = 19,
|
||||
Ps = 20,
|
||||
Pe = 21,
|
||||
Pc = 22,
|
||||
Po = 23,
|
||||
Sm = 24,
|
||||
Sc = 25,
|
||||
Sk = 26,
|
||||
So = 27,
|
||||
Pi = 28,
|
||||
Pf = 29,
|
||||
/// <summary>Uppercase_Letter; an uppercase letter.</summary>
|
||||
Lu,
|
||||
|
||||
/// <summary>Lowercase_Letter; a lowercase letter.</summary>
|
||||
Ll,
|
||||
|
||||
/// <summary>Titlecase_Letter; a digraph encoded as a single character, with first part uppercase.</summary>
|
||||
Lt,
|
||||
|
||||
/// <summary>Modifier_Letter; a modifier letter.</summary>
|
||||
Lm,
|
||||
|
||||
/// <summary>Other_Letter; other letters, including syllables and ideographs.</summary>
|
||||
Lo,
|
||||
|
||||
/// <summary>Nonspacing_Mark; a nonspacing combining mark (zero advance width).</summary>
|
||||
Mn,
|
||||
|
||||
/// <summary>Spacing_Mark; a spacing combining mark (positive advance width).</summary>
|
||||
Mc,
|
||||
|
||||
/// <summary>Enclosing_Mark; an enclosing combining mark.</summary>
|
||||
Me,
|
||||
|
||||
/// <summary>Decimal_Number; a decimal digit.</summary>
|
||||
Nd,
|
||||
|
||||
/// <summary>Letter_Number; a letterlike numeric character.</summary>
|
||||
Nl,
|
||||
|
||||
/// <summary>Other_Number; a numeric character of other type.</summary>
|
||||
No,
|
||||
|
||||
/// <summary>Connector_Punctuation; a connecting punctuation mark, like a tie.</summary>
|
||||
Pc,
|
||||
|
||||
/// <summary>Dash_Punctuation; a dash or hyphen punctuation mark.</summary>
|
||||
Pd,
|
||||
|
||||
/// <summary>Open_Punctuation; an opening punctuation mark (of a pair).</summary>
|
||||
Ps,
|
||||
|
||||
/// <summary>Close_Punctuation; a closing punctuation mark (of a pair).</summary>
|
||||
Pe,
|
||||
|
||||
/// <summary>Initial_Punctuation; an initial quotation mark.</summary>
|
||||
Pi,
|
||||
|
||||
/// <summary>Final_Punctuation; a final quotation mark.</summary>
|
||||
Pf,
|
||||
|
||||
/// <summary>Other_Punctuation; a punctuation mark of other type.</summary>
|
||||
Po,
|
||||
|
||||
/// <summary>Math_Symbol; a symbol of mathematical use.</summary>
|
||||
Sm,
|
||||
|
||||
/// <summary>Currency_Symbol; a currency sign.</summary>
|
||||
Sc,
|
||||
|
||||
/// <summary>Modifier_Symbol; a non-letterlike modifier symbol.</summary>
|
||||
Sk,
|
||||
|
||||
/// <summary>Other_Symbol; a symbol of other type.</summary>
|
||||
So,
|
||||
|
||||
/// <summary>Space_Separator; a space character (of various non-zero widths).</summary>
|
||||
Zs,
|
||||
|
||||
/// <summary>Line_Separator; U+2028 LINE SEPARATOR only.</summary>
|
||||
Zl,
|
||||
|
||||
/// <summary>Paragraph_Separator; U+2029 PARAGRAPH SEPARATOR only.</summary>
|
||||
Zp,
|
||||
|
||||
/// <summary>Control; a C0 or C1 control code.</summary>
|
||||
Cc,
|
||||
|
||||
/// <summary>Format; a format control character.</summary>
|
||||
Cf,
|
||||
|
||||
/// <summary>Surrogate; a surrogate code point.</summary>
|
||||
Cs,
|
||||
|
||||
/// <summary>Private_Use; a private-use character.</summary>
|
||||
Co,
|
||||
|
||||
/// <summary>Unassigned; a reserved unassigned code point or a noncharacter.</summary>
|
||||
Cn,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,19 +2,12 @@ using System.Diagnostics.CodeAnalysis;
|
|||
|
||||
namespace Dalamud.Interface.Internal.ImGuiSeStringRenderer.TextProcessing;
|
||||
|
||||
/// <summary><a href="https://unicode.org/reports/tr14/#Table1">Unicode line break class</a>.</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1300:Element should begin with an uppercase letter",
|
||||
Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1600:Elements should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
[SuppressMessage(
|
||||
"StyleCop.CSharp.DocumentationRules",
|
||||
"SA1602:Enumeration items should be documented",
|
||||
Justification = "Unicode Data")]
|
||||
internal enum UnicodeLineBreakClass : byte
|
||||
{
|
||||
/// <summary>Start of text.</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue