LibreOffice Module hwpfilter (master) 1
Public Member Functions | Private Attributes | List of all members
HWPFont Class Referencefinal

The HWPFont class has the font list for the document when it's saved. More...

#include <hfont.h>

Public Member Functions

 HWPFont (void)
 
 ~HWPFont (void)
 
void AddFont (int lang, const char *font)
 Adds a font into font list of a language. More...
 
const char * GetFontName (int lang, int id)
 
void Read (HWPFile &hwpf)
 

Private Attributes

int nFonts [NLanguage]
 System font count for each language NLanguage is 7 in common case. More...
 
std::unique_ptr< char[]> fontnames [NLanguage]
 list of the font family name More...
 

Detailed Description

The HWPFont class has the font list for the document when it's saved.

Font information

Definition at line 36 of file hfont.h.

Constructor & Destructor Documentation

◆ HWPFont()

HWPFont::HWPFont ( void  )

Definition at line 26 of file hfont.cxx.

References fontnames, nFonts, and NLanguage.

◆ ~HWPFont()

HWPFont::~HWPFont ( void  )

Definition at line 35 of file hfont.cxx.

Member Function Documentation

◆ AddFont()

void HWPFont::AddFont ( int  lang,
const char *  font 
)

Adds a font into font list of a language.

Parameters
langLanguage index
fontName of font family

Definition at line 37 of file hfont.cxx.

References FONTNAMELEN, fontnames, MAXFONTS, nFonts, NLanguage, and p.

Referenced by Read().

◆ GetFontName()

const char * HWPFont::GetFontName ( int  lang,
int  id 
)
Parameters
langLanguage index
idIndex of font
Returns
Font name

Definition at line 52 of file hfont.cxx.

References FONTNAMELEN, fontnames, nFonts, and NLanguage.

Referenced by HwpReader::parseCharShape().

◆ Read()

void HWPFont::Read ( HWPFile hwpf)

Member Data Documentation

◆ fontnames

std::unique_ptr<char[]> HWPFont::fontnames[NLanguage]
private

list of the font family name

Definition at line 46 of file hfont.h.

Referenced by AddFont(), GetFontName(), HWPFont(), and Read().

◆ nFonts

int HWPFont::nFonts[NLanguage]
private

System font count for each language NLanguage is 7 in common case.

Definition at line 42 of file hfont.h.

Referenced by AddFont(), GetFontName(), and HWPFont().


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