Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label layout breaks when font is missing #56

Open
tobil4sk opened this issue Sep 14, 2024 · 0 comments
Open

Label layout breaks when font is missing #56

tobil4sk opened this issue Sep 14, 2024 · 0 comments

Comments

@tobil4sk
Copy link

When a font is missing and a label uses a non-default font-size, then it seems to ignore the label size when laying out the remaining content.

Expected Behavior

The layout should respect the font size of the label.

Current Behavior

The label's font size is ignored.

Possible Solution

I ran into this because the default font was Arial, which has been changed in 10d6289. Updating to the latest git version of haxeui-html5 and avoiding fonts that may not exist universally avoids this issue.

Steps to Reproduce (for bugs)

  1. Use the main-view.xml given in the minimal test case.

  2. Observe the broken layout.

Media

First example

Initial layout:
image

Layout after 2 seconds pass:
image

Second example

Initial layout:
image

Layout after 2 seconds pass:
image

Test app / minimal test case

This example reproduces the behaviour:

<vbox style="padding: 5px;">
    <hbox>
        <label text="broken" style="font-family: 'BOB'; font-size: 30px"/>
        <label text="normal" />
    </hbox>
</vbox>

In the above case, the layout becomes correct after two seconds pass, however, in more complicated scenarios it remains broken even after updating:

<vbox style="padding: 5px;">
    <hbox>
        <label text="broken" style="font-family: 'BOB'; font-size: 30px"/>
        <label text="broken" style="font-family: 'BOB'; font-size: 30px"/>
        <label text="normal" />
    </hbox>
</vbox>

Your Environment

Behaviour seems consistent between firefox and chrome.

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

No branches or pull requests

1 participant