Identifiers for different styles of typeface metrics.
In new projects, it's recommended to use the 'portable' metrics kind, so that fonts display at a similar size on all platforms. Portable metrics are enabled by default when constructing a Font using FontOptions. The old, deprecated Font constructors will all request the legacy metrics kind instead. JUCE components that display text will query LookAndFeel::getDefaultMetricsKind() to find the kind of metrics that should be used. This function can be overridden to switch the metrics kind for the entire LookAndFeel.
The 'legacy' metrics kind uses the platform font facilities to retrieve font metrics. Each platform has its own idiosyncratic behaviour when computing metrics - depending on the typeface data, it's possible that the 'portable' metrics will differ from the 'legacy' metrics on every platform. The biggest differences between legacy and portable metrics are likely to be seen on Windows, so it may be helpful to check this platform first.
Enumerator |
---|
legacy | Old-style metrics that may differ for the same font file when running on different platforms.
This was the default behaviour prior to JUCE 8.
|
portable | Where possible, will return the same font metrics on all platforms.
It's a good idea to use this for new JUCE projects, to keep text layout and sizing consistent on all platforms.
|