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

Public Member Functions

 AndroidTypeface (const Font &font)
 
 AndroidTypeface (const void *data, size_t size)
 
void initialise (JNIEnv *const env)
 
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 > &glyphs, Array< float > &xOffsets) override
 
bool getOutlineForGlyph (int, Path &) override
 
EdgeTablegetEdgeTableForGlyph (int glyphNumber, const AffineTransform &t, float) override
 
- Public Member Functions inherited from Typeface
const StringgetName () const noexcept
 
const StringgetStyle () const noexcept
 
virtual ~Typeface ()
 
virtual bool isSuitableForFont (const Font &) const
 
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

GlobalRef typeface
 
GlobalRef paint
 
GlobalRef rect
 
float ascent
 
float descent
 
float heightToPointsFactor
 

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

AndroidTypeface::AndroidTypeface ( const Font font)
inline
AndroidTypeface::AndroidTypeface ( const void *  data,
size_t  size 
)
inline

Member Function Documentation

float AndroidTypeface::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.

float AndroidTypeface::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.

EdgeTable* AndroidTypeface::getEdgeTableForGlyph ( int  glyphNumber,
const AffineTransform transform,
float  fontHeight 
)
inlineoverridevirtual

Returns a new EdgeTable that contains the path for the givem glyph, with the specified transform applied.

Reimplemented from Typeface.

void AndroidTypeface::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.

float AndroidTypeface::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.

bool AndroidTypeface::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.

float AndroidTypeface::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.

void AndroidTypeface::initialise ( JNIEnv *const  env)
inline

Member Data Documentation

float AndroidTypeface::ascent
float AndroidTypeface::descent
float AndroidTypeface::heightToPointsFactor
GlobalRef AndroidTypeface::paint
GlobalRef AndroidTypeface::rect
GlobalRef AndroidTypeface::typeface

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