Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Nov 22, 2024
1 parent 3d1d74a commit 7a73e9e
Showing 1 changed file with 22 additions and 33 deletions.
55 changes: 22 additions & 33 deletions MonoGame.Framework.Content.Pipeline/Utilities/FreeTypeAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;

using FT_Long = System.IntPtr;

namespace FreeTypeAPI
{
enum FT_Pixel_Mode
Expand Down Expand Up @@ -52,19 +54,6 @@ unsafe struct FT_Library
public int version_patch;

public uint num_modules;

public fixed long modules[128];

public FT_ListRec renderers;
public nint cur_renderer;
public nint auto_hinter;

public fixed long debug_hooks[4];

public fixed long lcd_geometry[6];

public int refcount;

};

struct FT_Generic
Expand All @@ -75,7 +64,7 @@ struct FT_Generic

struct FT_BBox
{
public long xMin, yMin, xMax, yMax;
public FT_Long xMin, yMin, xMax, yMax;
}

struct FT_ListRec
Expand All @@ -85,31 +74,31 @@ struct FT_ListRec

struct FT_Vector
{
public long x, y;
public FT_Long x, y;
}

struct FT_Matrix
{
public long xx, xy, yx, yy;
public FT_Long xx, xy, yx, yy;
}

struct FT_Glyph_Metrics
{
public long width, height, horiBearingX, horiBearingY, horiAdvance, vertBearingX, vertBearingY, vertAdvance;
public FT_Long width, height, horiBearingX, horiBearingY, horiAdvance, vertBearingX, vertBearingY, vertAdvance;
}

struct FT_Size_Metrics
{
public ushort x_ppem;
public ushort y_ppem;

public long x_scale;
public long y_scale;
public FT_Long x_scale;
public FT_Long y_scale;

public long ascender;
public long descender;
public long height;
public long max_advance;
public FT_Long ascender;
public FT_Long descender;
public FT_Long height;
public FT_Long max_advance;
}

unsafe struct FT_Size
Expand Down Expand Up @@ -155,13 +144,13 @@ struct FT_SubGlyph

unsafe struct FT_Face
{
public long num_faces;
public long face_index;
public FT_Long num_faces;
public FT_Long face_index;

public long face_flags;
public long style_flags;
public FT_Long face_flags;
public FT_Long style_flags;

public long num_glyphs;
public FT_Long num_glyphs;

public nint family_name;
public nint style_name;
Expand Down Expand Up @@ -212,8 +201,8 @@ unsafe struct FT_GlyphSlot
public FT_Generic generic;

public FT_Glyph_Metrics metrics;
public long linearHoriAdvance;
public long linearVertAdvance;
public FT_Long linearHoriAdvance;
public FT_Long linearVertAdvance;
public FT_Vector advance;

public FT_Glyph_Format format;
Expand All @@ -228,10 +217,10 @@ unsafe struct FT_GlyphSlot
public FT_SubGlyph* subglyphs;

public nint control_data;
public long control_len;
public FT_Long control_len;

public long lsb_delta;
public long rsb_delta;
public FT_Long lsb_delta;
public FT_Long rsb_delta;

public nint other;

Expand Down

0 comments on commit 7a73e9e

Please sign in to comment.