cheshirekow
v0.1.0
|
An LangSet is an abstract type that holds the set of languages supported by a font. More...
#include <cpp_fontconfig/LangSet.h>
Public Member Functions | |
bool | add (const Char8_t *lang) |
add a language to a langset More... | |
LangResult_t | compare (const RefPtr< LangSet > lsb) |
compare language sets More... | |
bool | contains (const RefPtr< LangSet > lsb) |
check langset subset relation More... | |
RefPtr< LangSet > | copy () |
copy a langset object More... | |
RefPtr< LangSet > | creatUnion (const RefPtr< LangSet > b) |
Add langsets. More... | |
bool | del (const Char8_t *lang) |
delete a language from a langset More... | |
void | destroy () |
destroy a langset object More... | |
bool | equal (const RefPtr< LangSet > lsb) |
test for matching langsets More... | |
RefPtr< StrSet > | getLangs () |
Get list of languages. More... | |
Char32_t | hash () |
return a hash value for a langset More... | |
LangResult_t | hasLang (const Char8_t *lang) |
test langset for language support More... | |
LangSetDelegate * | operator-> () |
const LangSetDelegate * | operator-> () const |
RefPtr< LangSet > | subtract (const RefPtr< LangSet > b) |
Subtract langsets. More... | |
Private Member Functions | |
LangSetDelegate (FcLangSet *ptr) | |
wrap constructor More... | |
LangSetDelegate (const LangSetDelegate &other) | |
not copy-constructable More... | |
LangSetDelegate & | operator= (const LangSetDelegate &other) |
not assignable More... | |
Private Attributes | |
FcLangSet * | m_ptr |
Friends | |
class | RefPtr< LangSet > |
An LangSet is an abstract type that holds the set of languages supported by a font.
Operations to build and compare these sets are provided. These are computed for a font based on orthographic information built into the fontconfig library. Fontconfig has orthographies for all of the ISO 639-1 languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If you have orthographic information for any of these languages, please submit them.
|
inlineexplicitprivate |
|
private |
not copy-constructable
bool fontconfig::LangSetDelegate::add | ( | const Char8_t * | lang | ) |
add a language to a langset
lang is added to ls. lang should be of the form Ll-Tt where Ll is a two or three letter language from ISO 639 and Tt is a territory from ISO 3166.
LangResult_t fontconfig::LangSetDelegate::compare | ( | const RefPtr< LangSet > | lsb | ) |
compare language sets
FcLangSetCompare compares language coverage for ls_a and ls_b. If they share any language and territory pair, this function returns FcLangEqual. If they share a language but differ in which territory that language is for, this function returns FcLangDifferentTerritory. If they share no languages in common, this function returns FcLangDifferentLang.
check langset subset relation
FcLangSetContains returns FcTrue if ls_a contains every language in ls_b. ls_a will 'contain' a language from ls_b if ls_a has exactly the language, or either the language or ls_a has no territory.
copy a langset object
FcLangSetCopy creates a new FcLangSet object and populates it with the contents of ls.
Add langsets.
Returns a set including only those languages found in either ls_a or ls_b.
bool fontconfig::LangSetDelegate::del | ( | const Char8_t * | lang | ) |
delete a language from a langset
lang is removed from ls. lang should be of the form Ll-Tt where Ll is a two or three letter language from ISO 639 and Tt is a territory from ISO 3166.
void fontconfig::LangSetDelegate::destroy | ( | ) |
destroy a langset object
FcLangSetDestroy destroys a FcLangSet object, freeing all memory associated with it.
test for matching langsets
Returns FcTrue if and only if ls_a supports precisely the same language and territory combinations as ls_b.
Char32_t fontconfig::LangSetDelegate::hash | ( | ) |
return a hash value for a langset
This function returns a value which depends solely on the languages supported by ls. Any language which equals ls will have the same result from FcLangSetHash. However, two langsets with the same hash value may not be equal.
LangResult_t fontconfig::LangSetDelegate::hasLang | ( | const Char8_t * | lang | ) |
test langset for language support
FcLangSetHasLang checks whether ls supports lang. If ls has a matching language and territory pair, this function returns FcLangEqual. If ls has a matching language but differs in which territory that language is for, this function returns FcLangDifferentTerritory. If ls has no matching language, this function returns FcLangDifferentLang.
|
inline |
|
inline |
|
private |
not assignable
Subtract langsets.
Returns a set including only those languages found in ls_a but not in ls_b.