You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An interesting feature would be to also save the embedded font from the SWF (optionally). This way this could solve the issue with user generated chinese text (which would not be practicable using Bitmap Font).
We would then be able to draw the glyph pretty much using simple "lineTo" etc.
I have a few ideas on how to do it, we could render the whole text as a Bitmap, we could have reserved space in the texture and render the text there or we could draw the glyph as needed into the texture, if we hit a limit we overwrite the oldest accessed one.
Nothing is perfect but that might just do the trick, as long as it is fast (I guess we'll see once this is build).
Another completely separated solution would be to use FreeType and we render the text (or glyph) into the texture, but I kind of like the "haxe-only" approach, makes things even more portable, if we have performance issue, then FreeType it is!
curveTo could be approx. using lineTo (I think!) for extra performance we could even hard-code the "lineTo" into the file itself (optionally) saving some computation time by having extra bits to the filesize.
An interesting feature would be to also save the embedded font from the SWF (optionally). This way this could solve the issue with user generated chinese text (which would not be practicable using Bitmap Font).
See: https://github.com/openfl/openfl/blob/f6dd84709ec233bb4e78cec7e9d6c9f39d4bad95/src/openfl/_internal/symbols/StaticTextSymbol.hx#L99
We would then be able to draw the glyph pretty much using simple "lineTo" etc.
I have a few ideas on how to do it, we could render the whole text as a Bitmap, we could have reserved space in the texture and render the text there or we could draw the glyph as needed into the texture, if we hit a limit we overwrite the oldest accessed one.
Nothing is perfect but that might just do the trick, as long as it is fast (I guess we'll see once this is build).
For heaps we would need to add support for "curveTo", we can probably approx. cubicCurveTo like Granick did here: https://github.com/openfl/lime/blob/2af3edb88e3c05b70faab3279292a45ba2c4860b/src/lime/tools/FlashHelper.hx#L376
Another completely separated solution would be to use FreeType and we render the text (or glyph) into the texture, but I kind of like the "haxe-only" approach, makes things even more portable, if we have performance issue, then FreeType it is!
FreeType mirror: https://github.com/aseprite/freetype2
The text was updated successfully, but these errors were encountered: