2007-11-04 06:23:28 +01:00
|
|
|
/*
|
|
|
|
* Copyright © 2007 Keith Packard
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
* the above copyright notice appear in all copies and that both that copyright
|
|
|
|
* notice and this permission notice appear in supporting documentation, and
|
|
|
|
* that the name of the copyright holders not be used in advertising or
|
|
|
|
* publicity pertaining to distribution of the software without specific,
|
|
|
|
* written prior permission. The copyright holders make no representations
|
|
|
|
* about the suitability of this software for any purpose. It is provided "as
|
|
|
|
* is" without express or implied warranty.
|
|
|
|
*
|
|
|
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
|
|
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
|
|
* OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcLangSet *
|
|
|
|
@FUNC@ FcLangSetCreate
|
|
|
|
@TYPE1@ void
|
|
|
|
@PURPOSE@ create a langset object
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
<function>FcLangSetCreate</function> creates a new FcLangSet object.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcLangSetDestroy
|
|
|
|
@TYPE1@ FcLangSet * @ARG1@ ls
|
|
|
|
@PURPOSE@ destroy a langset object
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
<function>FcLangSetDestroy</function> destroys a FcLangSet object, freeing
|
|
|
|
all memory associated with it.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcLangSet *
|
|
|
|
@FUNC@ FcLangSetCopy
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls
|
|
|
|
@PURPOSE@ copy a langset object
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
<function>FcLangSetCopy</function> creates a new FcLangSet object and
|
|
|
|
populates it with the contents of <parameter>ls</parameter>.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcLangSetAdd
|
|
|
|
@TYPE1@ FcLangSet * @ARG1@ ls
|
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ lang
|
|
|
|
@PURPOSE@ add a language to a langset
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
<parameter>lang</parameter> is added to <parameter>ls</parameter>.
|
|
|
|
<parameter>lang</parameter> 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.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcLangSetDel
|
|
|
|
@TYPE1@ FcLangSet * @ARG1@ ls
|
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ lang
|
|
|
|
@PURPOSE@ delete a language from a langset
|
2010-12-09 03:57:24 +01:00
|
|
|
@DESC@
|
|
|
|
<parameter>lang</parameter> is removed from <parameter>ls</parameter>.
|
|
|
|
<parameter>lang</parameter> 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.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.9.0
|
2010-12-09 03:57:24 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcLangSet *
|
|
|
|
@FUNC@ FcLangSetUnion
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls_a
|
|
|
|
@TYPE2@ const FcLangSet * @ARG2@ ls_b
|
|
|
|
@PURPOSE@ Add langsets
|
2010-12-09 03:57:24 +01:00
|
|
|
@DESC@
|
|
|
|
Returns a set including only those languages found in either <parameter>ls_a</parameter> or <parameter>ls_b</parameter>.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.9.0
|
2010-12-09 03:57:24 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcLangSet *
|
|
|
|
@FUNC@ FcLangSetSubtract
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls_a
|
|
|
|
@TYPE2@ const FcLangSet * @ARG2@ ls_b
|
|
|
|
@PURPOSE@ Subtract langsets
|
2010-12-09 03:57:24 +01:00
|
|
|
@DESC@
|
2010-12-28 09:58:16 +01:00
|
|
|
Returns a set including only those languages found in <parameter>ls_a</parameter> but not in <parameter>ls_b</parameter>.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.9.0
|
2010-12-09 03:57:24 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcLangResult
|
|
|
|
@FUNC@ FcLangSetCompare
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls_a
|
|
|
|
@TYPE2@ const FcLangSet * @ARG2@ ls_b
|
|
|
|
@PURPOSE@ compare language sets
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
<function>FcLangSetCompare</function> compares language coverage for
|
|
|
|
<parameter>ls_a</parameter> and <parameter>ls_b</parameter>. 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
|
2011-03-11 23:43:42 +01:00
|
|
|
function returns FcLangDifferentTerritory. If they share no languages in
|
2007-11-04 06:23:28 +01:00
|
|
|
common, this function returns FcLangDifferentLang.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcLangSetContains
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls_a
|
|
|
|
@TYPE2@ const FcLangSet * @ARG2@ ls_b
|
|
|
|
@PURPOSE@ check langset subset relation
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
<function>FcLangSetContains</function> returns FcTrue if
|
|
|
|
<parameter>ls_a</parameter> contains every language in
|
|
|
|
<parameter>ls_b</parameter>. <parameter>ls_a</parameter> will 'contain' a
|
|
|
|
language from <parameter>ls_b</parameter> if <parameter>ls_a</parameter>
|
|
|
|
has exactly the language, or either the language or
|
|
|
|
<parameter>ls_a</parameter> has no territory.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcLangSetEqual
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls_a
|
|
|
|
@TYPE2@ const FcLangSet * @ARG2@ ls_b
|
|
|
|
@PURPOSE@ test for matching langsets
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
Returns FcTrue if and only if <parameter>ls_a</parameter> supports precisely
|
|
|
|
the same language and territory combinations as <parameter>ls_b</parameter>.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcChar32
|
|
|
|
@FUNC@ FcLangSetHash
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls
|
|
|
|
@PURPOSE@ return a hash value for a langset
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
This function returns a value which depends solely on the languages
|
|
|
|
supported by <parameter>ls</parameter>. Any language which equals
|
2007-11-04 07:41:38 +01:00
|
|
|
<parameter>ls</parameter> will have the same result from
|
2007-11-04 06:23:28 +01:00
|
|
|
<function>FcLangSetHash</function>. However, two langsets with the same hash
|
|
|
|
value may not be equal.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcLangResult
|
|
|
|
@FUNC@ FcLangSetHasLang
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls
|
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ lang
|
|
|
|
@PURPOSE@ test langset for language support
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
<function>FcLangSetHasLang</function> checks whether
|
2022-12-13 08:05:41 +01:00
|
|
|
<parameter>ls</parameter> supports <parameter>lang</parameter>. If
|
2007-11-04 06:23:28 +01:00
|
|
|
<parameter>ls</parameter> has a matching language and territory pair,
|
|
|
|
this function returns FcLangEqual. If <parameter>ls</parameter> has
|
|
|
|
a matching language but differs in which territory that language is for, this
|
2022-12-13 08:05:41 +01:00
|
|
|
function returns FcLangDifferentTerritory. If <parameter>ls</parameter>
|
2007-11-04 06:23:28 +01:00
|
|
|
has no matching language, this function returns FcLangDifferentLang.
|
|
|
|
@@
|
2007-11-05 21:29:44 +01:00
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcStrSet *
|
|
|
|
@FUNC@ FcGetDefaultLangs
|
|
|
|
@TYPE1@ void
|
|
|
|
@PURPOSE@ Get the default languages list
|
2012-03-29 13:25:20 +02:00
|
|
|
@DESC@
|
|
|
|
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.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.9.91
|
2014-03-07 11:42:21 +01:00
|
|
|
@@
|
2012-03-29 13:25:20 +02:00
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcStrSet *
|
|
|
|
@FUNC@ FcLangSetGetLangs
|
|
|
|
@TYPE1@ const FcLangSet * @ARG1@ ls
|
|
|
|
@PURPOSE@ get the list of languages in the langset
|
2009-02-14 01:30:43 +01:00
|
|
|
@DESC@
|
|
|
|
Returns a string set of all languages in <parameter>langset</parameter>.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcStrSet *
|
|
|
|
@FUNC@ FcGetLangs
|
|
|
|
@TYPE1@ void
|
|
|
|
@PURPOSE@ Get list of languages
|
2007-11-05 21:29:44 +01:00
|
|
|
@DESC@
|
|
|
|
Returns a string set of all known languages.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcChar8 *
|
|
|
|
@FUNC@ FcLangNormalize
|
|
|
|
@TYPE1@ const FcChar8 * @ARG1@ lang
|
|
|
|
@PURPOSE@ Normalize the language string
|
2012-09-10 09:09:04 +02:00
|
|
|
@DESC@
|
|
|
|
Returns a string to make <parameter>lang</parameter> suitable on fontconfig.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.10.91
|
2012-09-10 09:09:04 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ const FcCharSet *
|
|
|
|
@FUNC@ FcLangGetCharSet
|
|
|
|
@TYPE1@ const FcChar8 * @ARG1@ lang
|
|
|
|
@PURPOSE@ Get character map for a language
|
2007-11-05 21:29:44 +01:00
|
|
|
@DESC@
|
|
|
|
Returns the FcCharMap for a language.
|
|
|
|
@@
|