Skip to content

Font display screw up when specify fallback font family #3408

@Rey-Wang

Description

@Rey-Wang

Environment info

  • Cytoscape.js version : 3.33.0
  • Browser/Node.js & version : Chrome Version 138.0.7204.49 (Official Build) (arm64)

Current (buggy) behaviour
When specify a fallback family, the font display is not collapsed

Image

when change some style and save, you are able to see full text

Image

Desired behaviour
Should display different font family correctly

Minimum steps to reproduce
When change the font-family style from 'font-family': 'Roboto Mono' to be 'font-family': 'Roboto Mono, Inter'

I also notice this issue happen on another issue, even its few years ago

Please check this simple demo. The issue occurs on initial page load, so I suspect it’s related to lazy font loading.
https://codesandbox.io/p/sandbox/bai-frontend-react-hfpnt

For reviewers

Reviewers should ensure that the following tasks are carried out for incorporated issues:

  • Ensure that the reporter has included a reproducible demo. They can easily fork this JSBin demo: http://jsbin.com/fiqugiq
  • The issue has been associated with a corresponding milestone.
  • The commits have been incorporated into the corresponding branches. Bug-fix patches go on
    • master and
    • unstable.
  • The issue has been labelled as a bug, if necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug in the code of Cytoscape.js

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions