openshot-audio  0.1.7
Classes | Public Member Functions | Public Attributes | List of all members
OSXTypeface Class Reference
Inheritance diagram for OSXTypeface:
Typeface ReferenceCountedObject

Public Member Functions

 OSXTypeface (const Font &font)
 
 ~OSXTypeface ()
 
float getAscent () const override
 
float getDescent () const override
 
float getHeightToPointsFactor () const override
 
float getStringWidth (const String &text) override
 
void getGlyphPositions (const String &text, Array< int > &resultGlyphs, Array< float > &xOffsets) override
 
bool getOutlineForGlyph (int glyphNumber, Path &path) override
 
- Public Member Functions inherited from Typeface
const StringgetName () const noexcept
 
const StringgetStyle () const noexcept
 
virtual ~Typeface ()
 
virtual bool isSuitableForFont (const Font &) const
 
virtual EdgeTablegetEdgeTableForGlyph (int glyphNumber, const AffineTransform &transform, float fontHeight)
 
virtual bool isHinted () const
 
void applyVerticalHintingTransform (float fontHeight, Path &path)
 
- Public Member Functions inherited from ReferenceCountedObject
void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 

Public Attributes

CGFontRef fontRef
 
float fontHeightToPointsFactor
 
CGAffineTransform renderingTransform
 

Additional Inherited Members

- Public Types inherited from Typeface
typedef ReferenceCountedObjectPtr< TypefacePtr
 
- Static Public Member Functions inherited from Typeface
static Ptr createSystemTypefaceFor (const Font &font)
 
static Ptr createSystemTypefaceFor (const void *fontFileData, size_t fontFileDataSize)
 
static void setTypefaceCacheSize (int numFontsToCache)
 
static void clearTypefaceCache ()
 
static void scanFolderForFonts (const File &folder)
 
- Protected Member Functions inherited from Typeface
 Typeface (const String &name, const String &style) noexcept
 
- Protected Member Functions inherited from ReferenceCountedObject
 ReferenceCountedObject ()
 
virtual ~ReferenceCountedObject ()
 
void resetReferenceCount () noexcept
 
- Static Protected Member Functions inherited from Typeface
static Ptr getFallbackTypeface ()
 
- Protected Attributes inherited from Typeface
String name
 
String style
 

Constructor & Destructor Documentation

◆ OSXTypeface()

OSXTypeface::OSXTypeface ( const Font font)
inline

◆ ~OSXTypeface()

OSXTypeface::~OSXTypeface ( )
inline

Member Function Documentation

◆ getAscent()

float OSXTypeface::getAscent ( ) const
inlineoverridevirtual

Returns the ascent of the font, as a proportion of its height. The height is considered to always be normalised as 1.0, so this will be a value less that 1.0, indicating the proportion of the font that lies above its baseline.

Implements Typeface.

◆ getDescent()

float OSXTypeface::getDescent ( ) const
inlineoverridevirtual

Returns the descent of the font, as a proportion of its height. The height is considered to always be normalised as 1.0, so this will be a value less that 1.0, indicating the proportion of the font that lies below its baseline.

Implements Typeface.

◆ getGlyphPositions()

void OSXTypeface::getGlyphPositions ( const String text,
Array< int > &  glyphs,
Array< float > &  xOffsets 
)
inlineoverridevirtual

Converts a line of text into its glyph numbers and their positions. The distances returned are based on the font having an normalised height of 1.0. You should never need to call this directly! Use Font::getGlyphPositions() instead!

Implements Typeface.

◆ getHeightToPointsFactor()

float OSXTypeface::getHeightToPointsFactor ( ) const
inlineoverridevirtual

Returns the value by which you should multiply a juce font-height value to convert it to the equivalent point-size.

Implements Typeface.

◆ getOutlineForGlyph()

bool OSXTypeface::getOutlineForGlyph ( int  glyphNumber,
Path path 
)
inlineoverridevirtual

Returns the outline for a glyph. The path returned will be normalised to a font height of 1.0.

Implements Typeface.

◆ getStringWidth()

float OSXTypeface::getStringWidth ( const String text)
inlineoverridevirtual

Measures the width of a line of text. The distance returned is based on the font having an normalised height of 1.0. You should never need to call this directly! Use Font::getStringWidth() instead!

Implements Typeface.

Member Data Documentation

◆ fontHeightToPointsFactor

float OSXTypeface::fontHeightToPointsFactor

◆ fontRef

CGFontRef OSXTypeface::fontRef

◆ renderingTransform

CGAffineTransform OSXTypeface::renderingTransform

The documentation for this class was generated from the following file: