CGM Objects Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
FontMap.h
1 // FontMap.h: interface for the CFontMap class.
2 //
5 
6 #if !defined(LST_FONTLIST_H__INCLUDED_)
7 #define LST_FONTLIST_H__INCLUDED_
8 
9 #pragma once
10 
11 #include <vector>
12 #include <fstream>
13 
14 namespace Larson
15 {
16  class CLSTFont;
17  class CFontProperties;
18 
20  class CFontMap
21  {
22  public:
23  CFontMap();
24  ~CFontMap();
25 
27  void add(long fontindex, std::wstring fontname, vector<std::wstring>* substitutes, bool forceSubst = true);
29  CLSTFont* getFont(long fontIndex);
31  size_t numFonts() { return m_fonts.size(); };
33  vector <CLSTFont *> m_fonts;
34 
35  long getMappedIndex(long fontIndex);
37  long getNumberMapped();
38 
39  protected:
44  vector <long> m_fontIndexMap;
45  };
46 }
47 
48 #endif // LST_FONTLIST_H__INCLUDED_
49 
size_t numFonts()
return number fonts in map
Definition: FontMap.h:31
long getNumberMapped()
get actual number of font indexes used. note this can be greater than number of fonts used e...
Definition: FontMap.cpp:101
CFontMap – Container for font objects of a CGM picture and used for text drawing and metrics in DrawB...
Definition: FontMap.h:20
vector< CLSTFont * > m_fonts
font list
Definition: FontMap.h:31
CLSTFont – Font object class, one per facename used in a CGM picture.
Definition: Font.h:28
CLSTFont * getFont(long fontIndex)
get font object for drawing
Definition: FontMap.cpp:67
vector< long > m_fontIndexMap
Definition: FontMap.h:44
void add(long fontindex, std::wstring fontname, vector< std::wstring > *substitutes, bool forceSubst=true)
add font to font list
Definition: FontMap.cpp:25