(font =
fonts.begin(); font !=
fonts.end(); ++font)
72 delete(*font).second;
98 static const char* errMsg =
" failed to open. To change font directory call " 99 " CFtglFontManager::Instance().SetFontPath(\"..font dir..\") before loading fonts.";
102sprintf(
buf,
"%s %i %i", filename,
size, ft);
133 unsigned char*
buffer=
nullptr;
134 size_tbufferSize = 0;
145 buffer= std::get<0>(it->second).get();
146bufferSize = std::get<1>(it->second);
149unique_ptr<unsigned char[]>
data;
153bufferSize = (size_t)
file.GetFileSize();
156 data.reset(
new unsigned char[bufferSize]);
157 if(
file.Read(
data.get(), bufferSize) != bufferSize)
170FTFont* font =
nullptr;
179font =
newFTTextureFont(
buffer, bufferSize);
182font =
newFTPixmapFont(
buffer, bufferSize);
185font =
newFTBitmapFont(
buffer, bufferSize);
188font =
newFTOutlineFont(
buffer, bufferSize);
191font =
newFTPolygonFont(
buffer, bufferSize);
194font =
newFTExtrudeFont(
buffer, bufferSize);
204 " failed to open. Default font path: "<<
m_FontPath);
221font->UseDisplayList(
true);
223 fonts[fontKey] = font;
Class for support low level input/output for files.
FTTextureFont is a specialisation of the FTFont class for handling Texture mapped fonts.
The NCBI C++ standard methods for dealing with std::string.
static CRWLock s_FontMapLock
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Error(CExceptionArgs_Base &args)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static bool IsPathSeparator(const char c)
Check whether a character "c" is a path separator symbol specific for the current platform.
virtual bool Exists(void) const
Check the entry existence.
static char GetPathSeparator(void)
Get path separator symbol specific for the current platform.
@ eRead
File can be read.
@ eOpen
Open an existing file, or create a new one.
string m_FontPath
Directory from which to read font files.
void SetFontPath(const string &p)
This path will be prepended to filename when calling GetFont It should be set to "ToStdString(CSysPat...
unsigned int m_DeviceResolution
target device (screen) resolution in pixels per inch (defaults to 72)
map< string, tuple< unique_ptr< unsigned char[]>, size_t > > m_BinaryData
Loaded to memeory font files.
static CFtglFontManager & Instance()
Get an instance of the manager so you can retrieve fonts.
void Clear()
Delete all current fonts.
EFtglFontType
FTGL can create different types of fonts from files read in using freetype, but the texture fonts are...
FTFont * GetFont(const char *filename, unsigned int size, EFtglFontType ft=eTextureFont)
FontList fonts
All the currently loaded fonts.
FontList::const_iterator FontIter
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4