Skip to content

Conversation

@thareh
Copy link
Contributor

@thareh thareh commented Feb 8, 2025

No description provided.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should return ULongInt

<a href="../examples/utf.bmx">Example source</a>
EndRem
Method UseUTFEncodings()
HPDF_UseUTFEncodings(docPtr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should return the result.

about:
<a href="../examples/load_font.bmx">Example source</a>
EndRem
Method LoadTTFontFromFile:String(path:String, embedding:Int=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@thareh
Copy link
Contributor Author

thareh commented Mar 17, 2025

Very good points, thanks.

I'll update the PR when I get a chance.

@woollybah
Copy link
Member

I lifted the reflection update out of here. Thanks :)

@thareh
Copy link
Contributor Author

thareh commented Aug 11, 2025

Ah yeah, no worries - but it still needs a bit more work I think.

Not sure if Return typeId.NewArray() is correct or if it should be Return typeId.NullValue()?

Seems jconv/tests/test.bmx runs but with some errors.

Also, TypeIdForTag needs to be made public in BRL.Reflection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants