Loading...
Searching...
No Matches

Classes

class  AttributedString
 A text string with a set of colour/font settings that are associated with sub-ranges of the text. More...
 
class  AttributedString::Attribute
 An attribute that has been applied to a range of characters in an AttributedString. More...
 
class  Font
 Represents a particular font, including its size, style, etc. More...
 
class  FontOptions
 Options that describe a particular font. More...
 
class  PositionedGlyph
 A glyph from a particular font, with a particular size, style, typeface and position. More...
 
class  GlyphArrangement
 A set of glyphs, each with a position. More...
 
class  TextLayout
 A Pre-formatted piece of text, which may contain multiple fonts and colours. More...
 
class  TextLayout::Glyph
 A positioned glyph. More...
 
class  TextLayout::Run
 A sequence of glyphs with a common font and colour. More...
 
class  TextLayout::Line
 A line containing a sequence of glyph-runs. More...
 
struct  ColourLayer
 A single path-based layer of a colour glyph. More...
 
struct  ImageLayer
 A bitmap representing (part of) a glyph, most commonly used to represent colour emoji glyphs. More...
 
struct  GlyphLayer
 A single layer that makes up part of a glyph image. More...
 
struct  TypefaceMetrics
 Font metrics using JUCE conventions. More...
 
class  Typeface
 A typeface represents a size-independent font. More...
 

Enumerations

enum class  TypefaceMetricsKind { TypefaceMetricsKind::legacy , TypefaceMetricsKind::portable }
 Identifiers for different styles of typeface metrics. More...
 

Detailed Description

Enumeration Type Documentation

◆ TypefaceMetricsKind

enum class TypefaceMetricsKind
strong

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.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram