ExpressionDim fontdim() should allow the "string" parameter for HorzExtent

Create issue
Issue #647 resolved
Pavlos Touboulidis created an issue

The pseudo-function fontdim() doesn't have any overloads that accept the "string" parameter to be used with the horizontal extent measurements, similar to:

<FontDim type="HorzExtent" string="W"/>

Reproducibility: N/A

Comments (2)

  1. Paul Turner

    To implement this the order of the parameters of existing fontdim overloads will change (they will end up more consistent) - so beware if you started using it already :)

    This said, I don't think anybody is actually using this (and certainly not in a stable version), so it should cause minimal disruption.

  2. Paul Turner

    In the end I did not modify the order of the existing fontdim. I've added a new 'stringextent' function that can be used to get the horizontal extent of strings as requested here.

    Be aware that this change also adds quoting of strings - using single quote - for all strings and names, but not for numbers or enumeration values.

    changeset: 3163:84c9cc8e4c6b user: Paul Turner <paul@cegui.org.uk> date: Tue Feb 28 00:42:43 2012 +0000 description: Rework ExpressionDim quite a bit: - String / name values are now quoted using and can contain spaces commas and such. - Spacing is now fully supported around all values given to pseudo-functions. - Added stringextent pseudo function that allows for measuring horizontal extent of strings. NB: This /still/ needs a lot more testing ;)

  3. Log in to comment