Added support for UTF and for loading of TTF fonts#41
Added support for UTF and for loading of TTF fonts#41thareh wants to merge 5 commits intobmx-ng:masterfrom
Conversation
| Function HPDF_GetCurrentEncoder:Byte ptr(handler:Byte Ptr, encodingName:Byte Ptr) | ||
| Function HPDF_SetCurrentEncoder:ULongInt(handler:Byte Ptr, encodingName:Byte Ptr) | ||
| Function HPDF_LoadRawImageFromMem:Byte Ptr(handler:Byte Ptr, buf:Byte Ptr, width:UInt, height:UInt, colorSpace:EPDFColorSpace, bitsPerComponent:UInt) | ||
| Function HPDF_UseUTFEncodings(handler:Byte Ptr) |
| <a href="../examples/utf.bmx">Example source</a> | ||
| EndRem | ||
| Method UseUTFEncodings() | ||
| HPDF_UseUTFEncodings(docPtr) |
| about: | ||
| <a href="../examples/load_font.bmx">Example source</a> | ||
| EndRem | ||
| Method LoadTTFontFromFile:String(path:String, embedding:Int=True) |
There was a problem hiding this comment.
The problem with this is it doesn't support multi byte file names.
It might be better to call it LoadTTFont and accept an path:Object and have it accept a TStream or String.
And then call LoadTTFontFromStream, passing in a specially constructed HPDF_Stream using something like HPDF_CallbackReader_New, which would wrap the callback functions into the TStream.
|
Very good points, thanks. I'll update the PR when I get a chance. |
|
I lifted the reflection update out of here. Thanks :) |
|
Ah yeah, no worries - but it still needs a bit more work I think. Not sure if Seems jconv/tests/test.bmx runs but with some errors. Also, |
No description provided.