Vielen Dank für den Hinweis.
Indem angegebenen Bereich finden sich tatsächlich die gesuchten Dateien, aber in anderem Kontext.
Das Zusammenspiel funktioniert leider noch nicht wie erwartet.
I didn't test
https://github.com/FactoryXCode/MfPack but it is the most complete implementation i saw, BUT
Be careful it is full of miss ordered functions with
overload , it may be all of them are wrong in every file in that translation.
here two examples
1)
IDWriteFontSet1
https://learn.microsoft.com/en-us/wi...dwritefontset1 the order of the functions is
Code:
....
IDWriteFontSet1::GetFilteredFonts
Retrieves a subset of fonts filtered by the given ranges, endpoint-inclusive.
IDWriteFontSet1::GetFilteredFonts
Retrieves a subset of fonts filtered by the given properties.
IDWriteFontSet1::GetFilteredFonts
Retrieves a subset of fonts, filtered by the given indices.
....
but in the translation from
https://github.com/FactoryXCode/MfPa...as#L2582-L2614 is
Delphi-Quellcode:
function GetFilteredFonts(properties: PDWRITE_FONT_PROPERTY;
propertyCount: UINT32;
selectAnyProperty: BOOL;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
function GetFilteredFonts(fontAxisRanges: DWRITE_FONT_AXIS_RANGE;
fontAxisRangeCount: UINT32;
selectAnyRange: BOOL;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
function GetFilteredFonts(indices: UINT32;
indexCount: UINT32;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
the three overloads are miss placed and they should be like this ,
the order should be
Delphi-Quellcode:
function GetFilteredFonts(indices: UINT32;
indexCount: UINT32;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
function GetFilteredFonts(properties: PDWRITE_FONT_PROPERTY;
propertyCount: UINT32;
selectAnyProperty: BOOL;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
function GetFilteredFonts(fontAxisRanges: DWRITE_FONT_AXIS_RANGE;
fontAxisRangeCount: UINT32;
selectAnyRange: BOOL;
out filteredFontSet: IDWriteFontSet1): HResult; overload; stdcall;
2) IDWriteGdiInterop1 from
https://learn.microsoft.com/en-us/wi...itegdiinterop1 the methods are these
Code:
IDWriteGdiInterop1::CreateFontFromLOGFONT
Creates a font object that matches the properties specified by the LOGFONT structure. (IDWriteGdiInterop1.CreateFontFromLOGFONT)
IDWriteGdiInterop1::GetFontSignature
Reads the font signature from the given font. (overload 2/2)
IDWriteGdiInterop1::GetFontSignature
Reads the font signature from the given font. (overload 1/2)
IDWriteGdiInterop1::GetMatchingFontsByLOGFONT
Gets a list of matching fonts based on the specified LOGFONT values. Only fonts of that family name will be returned.
The translation from
https://github.com/FactoryXCode/MfPa...#L1439C3-L1485
Delphi-Quellcode:
IDWriteGdiInterop1 = interface(IDWriteGdiInterop)
['{4556BE70-3ABD-4F70-90BE-421780A6F515}']
function CreateFontFromLOGFONT(_logFont: LOGFONT;
fontCollection: IDWriteFontCollection;
out font: IDWriteFont): HResult; stdcall;
function GetFontSignature(font: IDWriteFont;
out _fontSignature: FONTSIGNATURE): HResult; overload; stdcall;
function GetFontSignature(fontFace: IDWriteFontFace;
out fontSignature: FONTSIGNATURE): HResult; overload; stdcall;
function GetMatchingFontsByLOGFONT(_logFont: LOGFONT;
fontSet: IDWriteFontSet;
out filteredSet: IDWriteFontSet): HResult; stdcall;
end;
Also wrong and should be
Delphi-Quellcode:
IDWriteGdiInterop1 = interface(IDWriteGdiInterop)
['{4556BE70-3ABD-4F70-90BE-421780A6F515}']
function CreateFontFromLOGFONT(_logFont: LOGFONT;
fontCollection: IDWriteFontCollection;
out font: IDWriteFont): HResult; stdcall;
function GetFontSignature(fontFace: IDWriteFontFace;
out fontSignature: FONTSIGNATURE): HResult; overload; stdcall;
function GetFontSignature(font: IDWriteFont;
out _fontSignature: FONTSIGNATURE): HResult; overload; stdcall;
function GetMatchingFontsByLOGFONT(_logFont: LOGFONT;
fontSet: IDWriteFontSet;
out filteredSet: IDWriteFontSet): HResult; stdcall;
end;
this was only two examples but i think may be every overload is wrong in that library.
How to do it right ?
lets assume A,B,C,D,E,O? are interface methods, only O1,O2,O3 are overloaded methods for O, they have the same name with different parameters
let say we have an interface declared like this in an interface from Windows
SDK for C++
the right translation in Pascal/Delphi should be like this
I pretty sure about the above problem with overloaded functions ordering and how VisualStudio missed this for long time as they can't fix it or change it, if someone can prove me wrong, then please i would to see the correct ordering.