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

Public Member Functions

 WindowsTypeface (const Font &font)
 
 WindowsTypeface (const void *data, size_t dataSize)
 
 ~WindowsTypeface ()
 
float getAscent () const
 
float getDescent () const
 
float getHeightToPointsFactor () const
 
float getStringWidth (const String &text)
 
void getGlyphPositions (const String &text, Array< int > &resultGlyphs, Array< float > &xOffsets)
 
bool getOutlineForGlyph (int glyphNumber, Path &glyphPath)
 
- 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
 

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

◆ WindowsTypeface() [1/2]

WindowsTypeface::WindowsTypeface ( const Font font)
inline

◆ WindowsTypeface() [2/2]

WindowsTypeface::WindowsTypeface ( const void *  data,
size_t  dataSize 
)
inline

◆ ~WindowsTypeface()

WindowsTypeface::~WindowsTypeface ( )
inline

Member Function Documentation

◆ getAscent()

float WindowsTypeface::getAscent ( ) const
inlinevirtual

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 WindowsTypeface::getDescent ( ) const
inlinevirtual

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 WindowsTypeface::getGlyphPositions ( const String text,
Array< int > &  glyphs,
Array< float > &  xOffsets 
)
inlinevirtual

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 WindowsTypeface::getHeightToPointsFactor ( ) const
inlinevirtual

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 WindowsTypeface::getOutlineForGlyph ( int  glyphNumber,
Path path 
)
inlinevirtual

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

Implements Typeface.

◆ getStringWidth()

float WindowsTypeface::getStringWidth ( const String text)
inlinevirtual

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.


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