LMMS
Loading...
Searching...
No Matches
juce::FreeTypeTypeface Class Reference
Inheritance diagram for juce::FreeTypeTypeface:
juce::CustomTypeface juce::Typeface juce::ReferenceCountedObject

Public Member Functions

 FreeTypeTypeface (const Font &font)
 FreeTypeTypeface (const void *data, size_t dataSize)
void initialiseCharacteristics (const String &fontName, const String &fontStyle)
bool loadGlyphIfPossible (const juce_wchar character)
Public Member Functions inherited from juce::CustomTypeface
 CustomTypeface ()
 CustomTypeface (InputStream &serialisedTypefaceStream)
 ~CustomTypeface () override
void clear ()
void setCharacteristics (const String &fontFamily, float ascent, bool isBold, bool isItalic, juce_wchar defaultCharacter) noexcept
void setCharacteristics (const String &fontFamily, const String &fontStyle, float ascent, juce_wchar defaultCharacter) noexcept
void addGlyph (juce_wchar character, const Path &path, float width) noexcept
void addKerningPair (juce_wchar char1, juce_wchar char2, float extraAmount) noexcept
void addGlyphsFromOtherTypeface (Typeface &typefaceToCopy, juce_wchar characterStartIndex, int numCharacters) noexcept
bool writeToStream (OutputStream &outputStream)
float getAscent () const override
float getDescent () const override
float getHeightToPointsFactor () const override
float getStringWidth (const String &) override
void getGlyphPositions (const String &, Array< int > &glyphs, Array< float > &xOffsets) override
bool getOutlineForGlyph (int glyphNumber, Path &) override
EdgeTablegetEdgeTableForGlyph (int glyphNumber, const AffineTransform &, float fontHeight) override
Public Member Functions inherited from juce::Typeface
const StringgetName () const noexcept
const StringgetStyle () const noexcept
 ~Typeface () override
virtual bool isSuitableForFont (const Font &) const
virtual bool isHinted () const
void applyVerticalHintingTransform (float fontHeight, Path &path)
Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
void decReferenceCount () noexcept
bool decReferenceCountWithoutDeleting () noexcept
int getReferenceCount () const noexcept

Private Member Functions

bool getGlyphShape (Path &destShape, const FT_Outline &outline, float scaleX)
void addKerning (FT_Face face, const uint32 character, const uint32 glyphIndex)

Private Attributes

FTFaceWrapper::Ptr faceWrapper

Additional Inherited Members

Public Types inherited from juce::Typeface
using Ptr = ReferenceCountedObjectPtr<Typeface>
Static Public Member Functions inherited from juce::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 juce::Typeface
 Typeface (const String &name, const String &style) noexcept
Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject ()=default
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
virtual ~ReferenceCountedObject ()
void resetReferenceCount () noexcept
Static Protected Member Functions inherited from juce::Typeface
static Ptr getFallbackTypeface ()
Protected Attributes inherited from juce::CustomTypeface
juce_wchar defaultCharacter
float ascent
Protected Attributes inherited from juce::Typeface
String name
String style

Constructor & Destructor Documentation

◆ FreeTypeTypeface() [1/2]

juce::FreeTypeTypeface::FreeTypeTypeface ( const Font & font)
inline

◆ FreeTypeTypeface() [2/2]

juce::FreeTypeTypeface::FreeTypeTypeface ( const void * data,
size_t dataSize )
inline

Member Function Documentation

◆ addKerning()

void juce::FreeTypeTypeface::addKerning ( FT_Face face,
const uint32 character,
const uint32 glyphIndex )
inlineprivate

◆ getGlyphShape()

bool juce::FreeTypeTypeface::getGlyphShape ( Path & destShape,
const FT_Outline & outline,
float scaleX )
inlineprivate

◆ initialiseCharacteristics()

void juce::FreeTypeTypeface::initialiseCharacteristics ( const String & fontName,
const String & fontStyle )
inline

◆ loadGlyphIfPossible()

bool juce::FreeTypeTypeface::loadGlyphIfPossible ( const juce_wchar characterNeeded)
inlinevirtual

If a subclass overrides this, it can load glyphs into the font on-demand. When methods such as getGlyphPositions() or getOutlineForGlyph() are asked for a particular character and there's no corresponding glyph, they'll call this method so that a subclass can try to add that glyph, returning true if it manages to do so.

Reimplemented from juce::CustomTypeface.

Member Data Documentation

◆ faceWrapper

FTFaceWrapper::Ptr juce::FreeTypeTypeface::faceWrapper
private

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