Issue #78 resolved
Former user created an issue

Automatic migration. Original reporter: "spannerman"

Functionality request: Ability to clone an already loaded font.

Many gui systems will require a font to be displayed in more than one single point size. Currently in order to do this the same font must be loaded twice, with the font size specified differently in XML or dynamically changed via the setProperty("PointSize", intSize); property.

Original topic thread: http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1695

Reproducibility: N/A

Comments (4)

  1. Former user Account Deleted

    Original reporter: Dalfy

    0.6 font format will allow definition of definition of multiple size for the same font. Do you think it solve the issue suggest here or is font clonning still interesting ?

  2. Lukas Meindl

    This feature already exists in 0.8.0.

    To summarise: You want to dynamically change the font size used for CEGUI widgets, which will affect all widgets using that specific font you wanna change.

    Since there are also bitmap-based pixmap fonts, the property does not exist for all Fonts. Not to run into issues, you can use isPropertyPresent(...) to check if the property is available. Now if this is the case you could use the float-value "PointSize" property to set the Font size and you are all in the clear.

  3. Log in to comment