Files
2026-06-04 11:42:34 +02:00

238 lines
7.2 KiB
C#

using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using UnityEngine.Internal;
using UnityEngine.Scripting;
namespace UnityEngine
{
// Token: 0x02000244 RID: 580
public sealed class Font : Object
{
// Token: 0x060027C0 RID: 10176 RVA: 0x0002DB64 File Offset: 0x0002BD64
public Font()
{
Font.Internal_CreateFont(this, null);
}
// Token: 0x060027C1 RID: 10177 RVA: 0x0002DB74 File Offset: 0x0002BD74
public Font(string name)
{
Font.Internal_CreateFont(this, name);
}
// Token: 0x060027C2 RID: 10178 RVA: 0x0002DB84 File Offset: 0x0002BD84
private Font(string[] names, int size)
{
Font.Internal_CreateDynamicFont(this, names, size);
}
// Token: 0x060027C3 RID: 10179
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern string[] GetOSInstalledFontNames();
// Token: 0x060027C4 RID: 10180
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_CreateFont([Writable] Font _font, string name);
// Token: 0x060027C5 RID: 10181
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_CreateDynamicFont([Writable] Font _font, string[] _names, int size);
// Token: 0x060027C6 RID: 10182 RVA: 0x0002DB98 File Offset: 0x0002BD98
public static Font CreateDynamicFontFromOSFont(string fontname, int size)
{
return new Font(new string[] { fontname }, size);
}
// Token: 0x060027C7 RID: 10183 RVA: 0x0002DBC0 File Offset: 0x0002BDC0
public static Font CreateDynamicFontFromOSFont(string[] fontnames, int size)
{
return new Font(fontnames, size);
}
// Token: 0x1700095D RID: 2397
// (get) Token: 0x060027C8 RID: 10184
// (set) Token: 0x060027C9 RID: 10185
public extern Material material
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x060027CA RID: 10186
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public extern bool HasCharacter(char c);
// Token: 0x1700095E RID: 2398
// (get) Token: 0x060027CB RID: 10187
// (set) Token: 0x060027CC RID: 10188
public extern string[] fontNames
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x1700095F RID: 2399
// (get) Token: 0x060027CD RID: 10189
// (set) Token: 0x060027CE RID: 10190
public extern CharacterInfo[] characterInfo
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x060027CF RID: 10191
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public extern void RequestCharactersInTexture(string characters, [UnityEngine.Internal.DefaultValue("0")] int size, [UnityEngine.Internal.DefaultValue("FontStyle.Normal")] FontStyle style);
// Token: 0x060027D0 RID: 10192 RVA: 0x0002DBE0 File Offset: 0x0002BDE0
[ExcludeFromDocs]
public void RequestCharactersInTexture(string characters, int size)
{
FontStyle fontStyle = FontStyle.Normal;
this.RequestCharactersInTexture(characters, size, fontStyle);
}
// Token: 0x060027D1 RID: 10193 RVA: 0x0002DBFC File Offset: 0x0002BDFC
[ExcludeFromDocs]
public void RequestCharactersInTexture(string characters)
{
FontStyle fontStyle = FontStyle.Normal;
int num = 0;
this.RequestCharactersInTexture(characters, num, fontStyle);
}
// Token: 0x14000015 RID: 21
// (add) Token: 0x060027D2 RID: 10194 RVA: 0x0002DC18 File Offset: 0x0002BE18
// (remove) Token: 0x060027D3 RID: 10195 RVA: 0x0002DC4C File Offset: 0x0002BE4C
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
public static event Action<Font> textureRebuilt;
// Token: 0x060027D4 RID: 10196 RVA: 0x0002DC80 File Offset: 0x0002BE80
[RequiredByNativeCode]
private static void InvokeTextureRebuilt_Internal(Font font)
{
Action<Font> action = Font.textureRebuilt;
if (action != null)
{
action(font);
}
if (font.m_FontTextureRebuildCallback != null)
{
font.m_FontTextureRebuildCallback();
}
}
// Token: 0x14000016 RID: 22
// (add) Token: 0x060027D5 RID: 10197 RVA: 0x0002DCB8 File Offset: 0x0002BEB8
// (remove) Token: 0x060027D6 RID: 10198 RVA: 0x0002DCF0 File Offset: 0x0002BEF0
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
private event Font.FontTextureRebuildCallback m_FontTextureRebuildCallback;
// Token: 0x17000960 RID: 2400
// (get) Token: 0x060027D7 RID: 10199 RVA: 0x0002DD28 File Offset: 0x0002BF28
// (set) Token: 0x060027D8 RID: 10200 RVA: 0x0002DD44 File Offset: 0x0002BF44
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Font.textureRebuildCallback has been deprecated. Use Font.textureRebuilt instead.")]
public Font.FontTextureRebuildCallback textureRebuildCallback
{
get
{
return this.m_FontTextureRebuildCallback;
}
set
{
this.m_FontTextureRebuildCallback = value;
}
}
// Token: 0x060027D9 RID: 10201 RVA: 0x0002DD50 File Offset: 0x0002BF50
public static int GetMaxVertsForString(string str)
{
return str.Length * 4 + 4;
}
// Token: 0x060027DA RID: 10202
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public extern bool GetCharacterInfo(char ch, out CharacterInfo info, [UnityEngine.Internal.DefaultValue("0")] int size, [UnityEngine.Internal.DefaultValue("FontStyle.Normal")] FontStyle style);
// Token: 0x060027DB RID: 10203 RVA: 0x0002DD70 File Offset: 0x0002BF70
[ExcludeFromDocs]
public bool GetCharacterInfo(char ch, out CharacterInfo info, int size)
{
FontStyle fontStyle = FontStyle.Normal;
return this.GetCharacterInfo(ch, out info, size, fontStyle);
}
// Token: 0x060027DC RID: 10204 RVA: 0x0002DD94 File Offset: 0x0002BF94
[ExcludeFromDocs]
public bool GetCharacterInfo(char ch, out CharacterInfo info)
{
FontStyle fontStyle = FontStyle.Normal;
int num = 0;
return this.GetCharacterInfo(ch, out info, num, fontStyle);
}
// Token: 0x17000961 RID: 2401
// (get) Token: 0x060027DD RID: 10205
public extern bool dynamic
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000962 RID: 2402
// (get) Token: 0x060027DE RID: 10206
public extern int ascent
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000963 RID: 2403
// (get) Token: 0x060027DF RID: 10207
public extern int lineHeight
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000964 RID: 2404
// (get) Token: 0x060027E0 RID: 10208
public extern int fontSize
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x02000245 RID: 581
// (Invoke) Token: 0x060027E2 RID: 10210
[EditorBrowsable(EditorBrowsableState.Never)]
public delegate void FontTextureRebuildCallback();
}
}