Public Types | Static Public Member Functions | List of all members
libwps_tools_win::Font Class Reference

a class to convert a DOS© or Windows3© character in unicode More...

`#include <libwps_tools_win.h>`

## Public Types
enum | Type { CP_037, CP_424, CP_437, CP_500, CP_737, CP_775, DOS_850, CP_852, CP_855, CP_856, CP_857, CP_860, CP_861, CP_862, CP_863, CP_864, CP_865, CP_866, CP_869, CP_874, CP_875, CP_932, CP_950, CP_1006, CP_1026, WIN3_ARABIC, WIN3_BALTIC, WIN3_CEUROPE, WIN3_CYRILLIC, WIN3_GREEK, WIN3_HEBREW, WIN3_TURKISH, WIN3_VIETNAMESE, WIN3_WEUROPE, LICS, MAC_ARABIC, MAC_CELTIC, MAC_CEUROPE, MAC_CROATIAN, MAC_CYRILLIC, MAC_DEVANAGA, MAC_FARSI, MAC_GAELIC, MAC_GREEK, MAC_GUJARATI, MAC_GURMUKHI, MAC_HEBREW, MAC_ICELAND, MAC_INUIT, MAC_ROMAN, MAC_ROMANIAN, MAC_THAI, MAC_TURKISH, MAC_SYMBOL, WIN3_WINGDINGS, UNKNOWN }
| enum Type More...

## Static Public Member Functions
static unsigned long | unicode (unsigned char c, Type type)
| converts a character in unicode, knowing the character and the font type More...
static librevenge::RVNGString | unicodeString (const unsigned char *p, unsigned long size, Type type, bool skipUnknown=true)
| converts a list of character in unicode More...
static librevenge::RVNGString | unicodeString (std::string const &text, Type type)
| converts a list of character in unicode More...
static librevenge::RVNGString | unicodeString (librevenge::RVNGInputStream *stream, unsigned long size, Type type)
| converts a list of character in unicode More...
static Type | getTypeForOEM (int oem)
static Type | getTypeForString (char const *encoding)
static Type | getFontType (librevenge::RVNGString &name)
| returns the type of the font using the fontName More...
static librevenge::RVNGString | getTypeName (Type type)
| return the type name More...

## Detailed Description

a class to convert a DOS© or Windows3© character in unicode

## Member Enumeration Documentation

## ◆ Type

enum libwps_tools_win::Font::Type

enum Type

the knowned DOS© and Windows3© fonts

Enumerator
CP_037 |
CP_424 |
CP_437 |
CP_500 |
CP_737 |
CP_775 |
DOS_850 |
CP_852 |
CP_855 |
CP_856 |
CP_857 |
CP_860 |
CP_861 |
CP_862 |
CP_863 |
CP_864 |
CP_865 |
CP_866 |
CP_869 |
CP_874 |
CP_875 |
CP_932 |
CP_950 |
CP_1006 |
CP_1026 |
WIN3_ARABIC |
WIN3_BALTIC |
WIN3_CEUROPE |
WIN3_CYRILLIC |
WIN3_GREEK |
WIN3_HEBREW |
WIN3_TURKISH |
WIN3_VIETNAMESE |
WIN3_WEUROPE |
LICS |
MAC_ARABIC |
MAC_CELTIC |
MAC_CEUROPE |
MAC_CROATIAN |
MAC_CYRILLIC |
MAC_DEVANAGA |
MAC_FARSI |
MAC_GAELIC |
MAC_GREEK |
MAC_GUJARATI |
MAC_GURMUKHI |
MAC_HEBREW |
MAC_ICELAND |
MAC_INUIT |
MAC_ROMAN |
MAC_ROMANIAN |
MAC_THAI |
MAC_TURKISH |
MAC_SYMBOL |
WIN3_WINGDINGS |
UNKNOWN |

## Member Function Documentation

## ◆ getFontType()

Font::Type libwps_tools_win::Font::getFontType | ( | librevenge::RVNGString & | name | ) |
| static

returns the type of the font using the fontName

Parameters

  name | the font name.

Note
  name can be modified to suppress an extension

Referenced by Quattro9GraphInternal::SubDocument::parse(), DosWordParser::readCHP(), MSWriteParser::readCHP(), WKS4Parser::readFont(), WPS4Text::readFontNames(), LotusStyleManager::readFontStyleF0(), Quattro9ParserInternal::TextEntry::send(), and Quattro9Spreadsheet::sendCellContent().

## ◆ getTypeForOEM()

Font::Type libwps_tools_win::Font::getTypeForOEM | ( | int | oem | ) |
| static

returns the type corresponding to Windows OEM

Referenced by WPS4Parser::findZones(), DosWordParser::getFileEncoding(), and getTypeForString().

## ◆ getTypeForString()

Font::Type libwps_tools_win::Font::getTypeForString | ( | char const * | encoding | ) |
| static

returns the type corresponding to encoding string

Referenced by libwps::WPSDocument::parse().

## ◆ getTypeName()

librevenge::RVNGString libwps_tools_win::Font::getTypeName | ( | Type | type | ) |
| static

return the type name

Referenced by WPS4Parser::findZones(), and WPS4TextInternal::operator<<().

## ◆ unicode()

unsigned long libwps_tools_win::Font::unicode | ( | unsigned char | c,
|  | Font::Type | type
| ) |  |
| static

converts a character in unicode, knowing the character and the font type

Referenced by WPS8TextStyle::readParagraph(), and unicodeString().

## ◆ unicodeString() [1/3]

librevenge::RVNGString libwps_tools_win::Font::unicodeString | ( | const unsigned char * | p,
|  | unsigned long | size,
|  | Font::Type | type,
|  | bool | skipUnknown = `true`
| ) |  |
| static

converts a list of character in unicode

Referenced by WPS4Text::footNotesDataParser(), Quattro9ParserInternal::TextEntry::getString(), MSWriteParser::insertString(), LotusChart::readChart(), LotusChart::readChartName(), WKS4Parser::readCString(), QuattroParser::readCString(), MSWriteParser::readFFNTB(), libwps::MultiplanParser::readFilename(), LotusStyleManager::readFontStyleF0(), libwps::MultiplanParser::readFormula(), libwps::MultiplanParser::readFormulaV2(), libwps::MultiplanParser::readLink(), LotusParser::readLinkZone(), QuattroDosParser::readPString(), LotusChart::readSerieName(), LotusSpreadsheet::readSheetName(), LotusSpreadsheet::readSheetName1B(), DosWordParser::readSUMD(), WPSOLEParser::readSummaryPropertyString(), WPS4Text::readText(), MSWriteParser::readText(), Quattro9Graph::readTextboxStyle(), Quattro9Parser::readTextFontStyles(), Quattro9Parser::readZone(), Quattro9ParserInternal::TextEntry::send(), QuattroGraph::send(), libwps::MultiplanParser::sendCell(), QuattroDosSpreadsheet::sendCellContent(), WKS4Spreadsheet::sendCellContent(), QuattroSpreadsheet::sendCellContent(), LotusSpreadsheet::sendCellContent(), Quattro9Spreadsheet::sendCellContent(), QuattroDosParser::sendHeaderFooter(), WKS4Chart::sendText(), QuattroDosChart::sendText(), LotusChart::sendText(), LotusSpreadsheet::sendText(), LotusGraph::sendTextBox(), LotusGraph::sendTextBoxWK4(), LotusSpreadsheet::sendTextNote(), unicodeString(), and WPSOLE1Parser::updateMetaData().

## ◆ unicodeString() [2/3]

librevenge::RVNGString libwps_tools_win::Font::unicodeString | ( | std::string const & | text,
|  | Type | type
| ) |  |
| static

converts a list of character in unicode

## ◆ unicodeString() [3/3]

librevenge::RVNGString libwps_tools_win::Font::unicodeString | ( | librevenge::RVNGInputStream * | stream,
|  | unsigned long | size,
|  | Type | type
| ) |  |
| static

converts a list of character in unicode

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

- libwps_tools_win.h
- libwps_tools_win.cpp