Hello! I`m porting a game from flash to openfl and hit some troubles. Namely - current port of starling has small inconsistency between flash realization and openfl one (starling 2.4)
Specifically here: https://github.com/openfl/starling/blob/master/src/starling/text/TextField.hx
- In flash there is a way to give TextField custom class, derived from TextFormat (or custom class, derived from TextOptions). With this ability user can give text field additional values, which can be used later in custom BitmapFont renderer (since text format and options are the only way to send additinal text/rendering values to renderer)
- Current port has no ways to do so, since it creates default classes and uses copies. So there is no way to send something custom to custom BitmapRenderer.
And here: https://github.com/openfl/starling/blob/master/src/starling/text/BitmapFont.hx
- Starling properly sets index field of BitmapcharLocation, where openfl counterpart is not (in arrangeChars)
See https://github.com/Gamua/Starling-Framework/blob/master/starling/src/starling/text/BitmapFont.as
=> “charLocation.index = i;” Whithout this mapping it is hard to restore connections between custom styles and original text
I know i can copy off whole class (unfortunately there private fields used everywhere, that prevent simple override of methods) and use them with custom fixes, but… Are there any reasons not to do the same in openfl port? Flash realization much more flexible for fonts rendering customization. This was really convinient.