w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Font Class Referenceabstract

#include <Font.hpp>

Inheritance diagram for Font:
[legend]

Public Member Functions

virtual ~Font ()=default
 
virtual std::unique_ptr< Fontclone (double ds, double sc) const =0
 
virtual const FontuniqueFont () const =0
 
virtual std::string name () const =0
 
virtual double designSize () const =0
 
virtual double scaledSize () const =0
 
virtual double scaleFactor () const
 
virtual double charWidth (int c) const =0
 
virtual double charDepth (int c) const =0
 
virtual double charHeight (int c) const =0
 
virtual double italicCorr (int c) const =0
 
virtual const FontMetricsgetMetrics () const =0
 
virtual const char * path () const =0
 
virtual const char * filename () const
 
virtual const FontEncodingencoding () const
 
virtual bool getGlyph (int c, Glyph &glyph, GFGlyphTracer::Callback *callback=nullptr) const =0
 
virtual void getGlyphMetrics (int c, bool vertical, GlyphMetrics &metrics) const
 
virtual uint32_t unicode (uint32_t c) const
 
virtual void tidy () const
 
virtual bool findAndAssignBaseFontMap ()
 
virtual bool verticalLayout () const
 
virtual bool verifyChecksums () const
 
virtual int fontIndex () const
 
virtual const FontStylestyle () const
 
virtual Color color () const
 
virtual const FontMap::EntryfontMapEntry () const
 

Detailed Description

Abstract base for all font classes.

Definition at line 55 of file Font.hpp.

Constructor & Destructor Documentation

◆ ~Font()

virtual Font::~Font ( )
virtualdefault

Member Function Documentation

◆ charDepth()

virtual double Font::charDepth ( int  c) const
pure virtual

◆ charHeight()

virtual double Font::charHeight ( int  c) const
pure virtual

◆ charWidth()

◆ clone()

virtual std::unique_ptr<Font> Font::clone ( double  ds,
double  sc 
) const
pure virtual

◆ color()

virtual Color Font::color ( ) const
inlinevirtual

Reimplemented in NativeFont.

Definition at line 81 of file Font.hpp.

References Color::BLACK.

◆ designSize()

virtual double Font::designSize ( ) const
pure virtual

◆ encoding()

const FontEncoding * Font::encoding ( ) const
virtual

Returns the encoding object of this font which is asigned in a map file. If there's no encoding assigned, the function returns 0.

Reimplemented in PhysicalFontProxy, and PhysicalFontImpl.

Definition at line 48 of file Font.cpp.

References FontEncoding::encoding(), entry, and fontMapEntry().

Referenced by PhysicalFont::decodeChar(), and PhysicalFontProxy::encoding().

◆ filename()

const char * Font::filename ( ) const
virtual

Definition at line 93 of file Font.cpp.

References fname, path(), and strrchr.

Referenced by NativeFontImpl::findAndAssignBaseFontMap().

◆ findAndAssignBaseFontMap()

virtual bool Font::findAndAssignBaseFontMap ( )
inlinevirtual

Reimplemented in PhysicalFontImpl, and NativeFontImpl.

Definition at line 76 of file Font.hpp.

◆ fontIndex()

virtual int Font::fontIndex ( ) const
inlinevirtual

◆ fontMapEntry()

◆ getGlyph()

virtual bool Font::getGlyph ( int  c,
Glyph glyph,
GFGlyphTracer::Callback callback = nullptr 
) const
pure virtual

Implemented in EmptyFont, PhysicalFont, and VirtualFont.

◆ getGlyphMetrics()

void Font::getGlyphMetrics ( int  c,
bool  vertical,
GlyphMetrics metrics 
) const
virtual

Compute the extents of a given glyph.

Parameters
[in]ccharacter code of glyph
[in]verticaltrue if is glyph is part of vertical aligned text
[out]metricsthe resulting extents

Definition at line 68 of file Font.cpp.

References c, charDepth(), charHeight(), charWidth(), italicCorr(), s, scaleFactor(), and verticalLayout().

◆ getMetrics()

◆ italicCorr()

virtual double Font::italicCorr ( int  c) const
pure virtual

◆ name()

◆ path()

virtual const char* Font::path ( ) const
pure virtual

◆ scaledSize()

virtual double Font::scaledSize ( ) const
pure virtual

◆ scaleFactor()

virtual double Font::scaleFactor ( ) const
inlinevirtual

Definition at line 63 of file Font.hpp.

References designSize(), and scaledSize().

Referenced by getGlyphMetrics().

◆ style()

virtual const FontStyle* Font::style ( ) const
inlinevirtual

◆ tidy()

virtual void Font::tidy ( ) const
inlinevirtual

Reimplemented in PhysicalFontImpl.

Definition at line 75 of file Font.hpp.

◆ unicode()

uint32_t Font::unicode ( uint32_t  c) const
virtual

◆ uniqueFont()

virtual const Font* Font::uniqueFont ( ) const
pure virtual

◆ verifyChecksums()

virtual bool Font::verifyChecksums ( ) const
inlinevirtual

Reimplemented in TFMFont.

Definition at line 78 of file Font.hpp.

◆ verticalLayout()

virtual bool Font::verticalLayout ( ) const
inlinevirtual

Definition at line 77 of file Font.hpp.

References getMetrics(), and FontMetrics::verticalLayout().

Referenced by PhysicalFont::getExactGlyphBox(), and getGlyphMetrics().


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