mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 17:02:10 -10:00
54 lines
1.3 KiB
C#
54 lines
1.3 KiB
C#
//
|
|
// System.Drawing.Text.XrImpl.externLibs.cs
|
|
//
|
|
// Author:
|
|
// Alexandre Pigolkine ([email protected])
|
|
//
|
|
//
|
|
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
|
|
namespace System.Drawing.Text {
|
|
namespace XrImpl {
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
internal struct FcFontSet {
|
|
internal int nfont;
|
|
internal int sfont;
|
|
internal IntPtr fonts; // FcPattern **fonts;
|
|
}
|
|
|
|
internal enum FcResult : int {
|
|
FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId
|
|
}
|
|
|
|
class Xft {
|
|
|
|
const string XftImp = "Xft";
|
|
|
|
[DllImport(XftImp, EntryPoint="XftListFonts")]
|
|
internal static extern IntPtr XftListFontFamilies (IntPtr dpy, int screen, int zero1, IntPtr FC_FAMILY_PTR, int zero2 );
|
|
|
|
}
|
|
|
|
class Fontconfig {
|
|
const string FontconfigImp = "fontconfig";
|
|
|
|
internal static string FC_FAMILY = "family";
|
|
internal static IntPtr FC_FAMILY_PTR;
|
|
|
|
static Fontconfig() {
|
|
FC_FAMILY_PTR = Marshal.StringToHGlobalAnsi(FC_FAMILY);
|
|
}
|
|
|
|
[DllImport(FontconfigImp, CharSet = CharSet.Ansi)]
|
|
internal static extern int FcPatternGetString(IntPtr fcPattern, IntPtr obj, int n, ref IntPtr val);
|
|
|
|
[DllImport(FontconfigImp, CharSet = CharSet.Ansi)]
|
|
internal static extern int FcPatternGetString(int fcPattern, IntPtr obj, int n, ref IntPtr val);
|
|
}
|
|
}
|
|
}
|