Example #1
0
        internal unsafe void refreshName()
        {
            if (nativeFontFamily == IntPtr.Zero)
            {
                return;
            }

            char * namePtr = stackalloc char[GDIPlus.FACESIZE];
            Status status  = GDIPlus.GdipGetFamilyName(nativeFontFamily, (IntPtr)namePtr, 0);

            GDIPlus.CheckStatus(status);
            name = Marshal.PtrToStringUni((IntPtr)namePtr);
        }
Example #2
0
        internal void refreshName()
        {
            StringBuilder sb;

            if (nativeFontFamily == IntPtr.Zero)
            {
                return;
            }

            sb = new StringBuilder(GDIPlus.FACESIZE);
            Status status = GDIPlus.GdipGetFamilyName(nativeFontFamily, sb, 0);

            GDIPlus.CheckStatus(status);
            name = sb.ToString();
        }
Example #3
0
        internal void refreshName()
        {
            StringBuilder sb;

            if (nativeFontFamily == IntPtr.Zero)
            {
                return;
            }

            sb = new StringBuilder(GDIPlus.FACESIZE);
            Console.WriteLine("before calling Win32GdipGetFamilyName");
            Status status = GDIPlus.GdipGetFamilyName(nativeFontFamily, sb, 0);

            Console.WriteLine($"after calling Win32GdipGetFamilyName: {sb.ToString()}");
            GDIPlus.CheckStatus(status);
            name = sb.ToString();
        }