FcLangSetCreate

3 Fontconfig &version;

FcLangSetCreate

create a langset object

    #include <fontconfig/fontconfig.h>

    	    FcLangSet * FcLangSetCreate
    		void

## Description

`FcLangSetCreate` creates a new FcLangSet object.

FcLangSetDestroy

3 Fontconfig &version;

FcLangSetDestroy

destroy a langset object

    #include <fontconfig/fontconfig.h>

    	    void FcLangSetDestroy
    		FcLangSet *ls

## Description

`FcLangSetDestroy` destroys a FcLangSet object, freeing all memory associated with it.

FcLangSetCopy

3 Fontconfig &version;

FcLangSetCopy

copy a langset object

    #include <fontconfig/fontconfig.h>

    	    FcLangSet * FcLangSetCopy
    		const FcLangSet *ls

## Description

`FcLangSetCopy` creates a new FcLangSet object and populates it with the contents of `ls`.

FcLangSetAdd

3 Fontconfig &version;

FcLangSetAdd

add a language to a langset

    #include <fontconfig/fontconfig.h>

    	    FcBool FcLangSetAdd
    		FcLangSet *ls
    		const FcChar8 *lang

## Description

`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.

FcLangSetDel

3 Fontconfig &version;

FcLangSetDel

delete a language from a langset

    #include <fontconfig/fontconfig.h>

    	    FcBool FcLangSetDel
    		FcLangSet *ls
    		const FcChar8 *lang

## Description

`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.

## Since

version 2.9.0

FcLangSetUnion

3 Fontconfig &version;

FcLangSetUnion

Add langsets

    #include <fontconfig/fontconfig.h>

    	    FcLangSet * FcLangSetUnion
    		const FcLangSet *ls_a
    		const FcLangSet *ls_b

## Description

Returns a set including only those languages found in either `ls_a` or `ls_b`.

## Since

version 2.9.0

FcLangSetSubtract

3 Fontconfig &version;

FcLangSetSubtract

Subtract langsets

    #include <fontconfig/fontconfig.h>

    	    FcLangSet * FcLangSetSubtract
    		const FcLangSet *ls_a
    		const FcLangSet *ls_b

## Description

Returns a set including only those languages found in `ls_a` but not in `ls_b`.

## Since

version 2.9.0

FcLangSetCompare

3 Fontconfig &version;

FcLangSetCompare

compare language sets

    #include <fontconfig/fontconfig.h>

    	    FcLangResult FcLangSetCompare
    		const FcLangSet *ls_a
    		const FcLangSet *ls_b

## Description

`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.

FcLangSetContains

3 Fontconfig &version;

FcLangSetContains

check langset subset relation

    #include <fontconfig/fontconfig.h>

    	    FcBool FcLangSetContains
    		const FcLangSet *ls_a
    		const FcLangSet *ls_b

## Description

`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.

FcLangSetEqual

3 Fontconfig &version;

FcLangSetEqual

test for matching langsets

    #include <fontconfig/fontconfig.h>

    	    FcBool FcLangSetEqual
    		const FcLangSet *ls_a
    		const FcLangSet *ls_b

## Description

Returns FcTrue if and only if `ls_a` supports precisely the same language and territory combinations as `ls_b`.

FcLangSetHash

3 Fontconfig &version;

FcLangSetHash

return a hash value for a langset

    #include <fontconfig/fontconfig.h>

    	    FcChar32 FcLangSetHash
    		const FcLangSet *ls

## Description

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.

FcLangSetHasLang

3 Fontconfig &version;

FcLangSetHasLang

test langset for language support

    #include <fontconfig/fontconfig.h>

    	    FcLangResult FcLangSetHasLang
    		const FcLangSet *ls
    		const FcChar8 *lang

## Description

`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.

FcGetDefaultLangs

3 Fontconfig &version;

FcGetDefaultLangs

Get the default languages list

    #include <fontconfig/fontconfig.h>

    	    FcStrSet * FcGetDefaultLangs
    		void

## Description

Returns a string set of the default languages according to the environment variables on the system. This function looks for them in order of FC_LANG, LC_ALL, LC_CTYPE and LANG then. If there are no valid values in those environment variables, "en" will be set as fallback.

## Since

version 2.9.91

FcLangSetGetLangs

3 Fontconfig &version;

FcLangSetGetLangs

get the list of languages in the langset

    #include <fontconfig/fontconfig.h>

    	    FcStrSet * FcLangSetGetLangs
    		const FcLangSet *ls

## Description

Returns a string set of all languages in `langset`.

FcGetLangs

3 Fontconfig &version;

FcGetLangs

Get list of languages

    #include <fontconfig/fontconfig.h>

    	    FcStrSet * FcGetLangs
    		void

## Description

Returns a string set of all known languages.

FcLangNormalize

3 Fontconfig &version;

FcLangNormalize

Normalize the language string

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcLangNormalize
    		const FcChar8 *lang

## Description

Returns a string to make `lang` suitable on fontconfig.

## Since

version 2.10.91

FcLangGetCharSet

3 Fontconfig &version;

FcLangGetCharSet

Get character map for a language

    #include <fontconfig/fontconfig.h>

    	    const FcCharSet * FcLangGetCharSet
    		const FcChar8 *lang

## Description

Returns the FcCharMap for a language.