Exemplo n.º 1
0
        public unsafe IDWriteFontSet GetMatchingFontsByLOGFONT(LogFont logFont, IDWriteFontSet fontSet)
        {
            int   sizeOfLogFont = Marshal.SizeOf(logFont);
            byte *nativeLogFont = stackalloc byte[sizeOfLogFont];

            GetMatchingFontsByLOGFONT(new IntPtr(nativeLogFont), fontSet, out IDWriteFontSet filteredSet);
            return(filteredSet);
        }
    public unsafe IDWriteFontSet GetMatchingFontsByLOGFONT(LogFont logFont, IDWriteFontSet fontSet)
    {
        int   sizeOfLogFont = Marshal.SizeOf(logFont);
        byte *nativeLogFont = stackalloc byte[sizeOfLogFont];

        Marshal.StructureToPtr(logFont, new IntPtr(nativeLogFont), false);
        return(GetMatchingFontsByLOGFONT(new IntPtr(nativeLogFont), fontSet));
    }