I started the process to convert a .hx haxe class into a .mxhx based one using the @:build(mxhx.macros.MXHXComponent.build()) macro and I'm encountering an font embed issue.
Consider the mxhx code below:
<?xml version="1.0" encoding="utf-8"?>
<f:Drawer xmlns:mx="https://ns.mxhx.dev/2024/mxhx"
xmlns:f="https://ns.feathersui.com/mxhx"
xmlns:components="components.*">
<f:ScrollContainer id="mainScrollContainer">
<f:layout>
<f:VerticalLayout horizontalAlign="JUSTIFY"
verticalAlign="TOP"
paddingLeft="{model.Constants.GLOBAL_PADDING}"
paddingTop="{model.Constants.GLOBAL_PADDING}"
paddingRight="{model.Constants.GLOBAL_PADDING}"
paddingBottom="{model.Constants.GLOBAL_PADDING}"
/>
</f:layout>
<f:Button id="closeDrawerButton" text="Close drawer" click="{closeDrawer();}"/>
<components:VSpacer/>
<!-- profile picture AssetLoader -->
<f:AssetLoader id="ppal"/>
<components:VSpacer/>
<!-- basic infos LayoutGroup -->
<f:LayoutGroup id="lg1" height="80">
<f:backgroundSkin>
<f:RectangleSkin>
<f:fill>
<f:FillStyle.SolidColor color="0xFF00FF" alpha="1"/>
</f:fill>
</f:RectangleSkin>
</f:backgroundSkin>
<f:layout>
<f:VerticalLayout horizontalAlign="JUSTIFY"/>
</f:layout>
<f:Label id="firstNameLabel"
text="Hello!"
embedFonts="true">
<f:textFormat>
<f:TextFormat font="{model.Constants.MONTSERRAT_BOLD_700}" size="{model.Constants.FONT_SIZE_26}" color="{model.Constants.MAIN_COLOR1}"/>
</f:textFormat>
</f:Label>
</f:LayoutGroup>
</f:ScrollContainer>
</f:Drawer>
I can't get the TextFormat font tag to work at all, with or without using the full path, the Label stays empty.
<f:TextFormat font="{model.Constants.MONTSERRAT_BOLD_700}" size="{model.Constants.FONT_SIZE_26}" color="{model.Constants.MAIN_COLOR1}"/>
I tried with the code I used in my classic haxe classAssets.getFont(Constants.MONTSERRAT_BOLD_700).fontNameinto curly braces but it raises an error too.
Thanks for your help!