FcUtf8ToUcs4

3 Fontconfig &version;

FcUtf8ToUcs4

convert UTF-8 to UCS4

    #include <fontconfig/fontconfig.h>

    	    int FcUtf8ToUcs4
    		FcChar8 *src
    		FcChar32 *dst
    		int len

## Description

Converts the next Unicode char from `src` into `dst` and returns the number of bytes containing the char. `src` must be at least `len` bytes long.

FcUcs4ToUtf8

3 Fontconfig &version;

FcUcs4ToUtf8

convert UCS4 to UTF-8

    #include <fontconfig/fontconfig.h>

    	    int FcUcs4ToUtf8
    		FcChar32 src
    		FcChar8 dst[FC_UTF8_MAX_LEN]

## Description

Converts the Unicode char from `src` into `dst` and returns the number of bytes needed to encode the char.

FcUtf8Len

3 Fontconfig &version;

FcUtf8Len

count UTF-8 encoded chars

    #include <fontconfig/fontconfig.h>

    	    FcBool FcUtf8Len
    		FcChar8 *src
    		int len
    		int *nchar
    		int *wchar

## Description

Counts the number of Unicode chars in `len` bytes of `src`. Places that count in `nchar`. `wchar` contains 1, 2 or 4 depending on the number of bytes needed to hold the largest Unicode char counted. The return value indicates whether `src` is a well-formed UTF8 string.

FcUtf16ToUcs4

3 Fontconfig &version;

FcUtf16ToUcs4

convert UTF-16 to UCS4

    #include <fontconfig/fontconfig.h>

    	    int FcUtf16ToUcs4
    		FcChar8 *src
    		FcEndian endian
    		FcChar32 *dst
    		int len

## Description

Converts the next Unicode char from `src` into `dst` and returns the number of bytes containing the char. `src` must be at least `len` bytes long. Bytes of `src` are combined into 16-bit units according to `endian`.

FcUtf16Len

3 Fontconfig &version;

FcUtf16Len

count UTF-16 encoded chars

    #include <fontconfig/fontconfig.h>

    	    FcBool FcUtf16Len
    		FcChar8 *src
    		FcEndian endian
    		int len
    		int *nchar
    		int *wchar

## Description

Counts the number of Unicode chars in `len` bytes of `src`. Bytes of `src` are combined into 16-bit units according to `endian`. Places that count in `nchar`. `wchar` contains 1, 2 or 4 depending on the number of bytes needed to hold the largest Unicode char counted. The return value indicates whether `string` is a well-formed UTF16 string.

FcIsLower

3 Fontconfig &version;

FcIsLower

check for lower case ASCII character

    #include <fontconfig/fontconfig.h>

    	    FcBool FcIsLower
    		FcChar8c

## Description

This macro checks whether `c` is an lower case ASCII letter.

FcIsUpper

3 Fontconfig &version;

FcIsUpper

check for upper case ASCII character

    #include <fontconfig/fontconfig.h>

    	    FcBool FcIsUpper
    		FcChar8c

## Description

This macro checks whether `c` is a upper case ASCII letter.

FcToLower

3 Fontconfig &version;

FcToLower

convert upper case ASCII to lower case

    #include <fontconfig/fontconfig.h>

    	    FcChar8 FcToLower
    		FcChar8c

## Description

This macro converts upper case ASCII `c` to the equivalent lower case letter.

FcStrCopy

3 Fontconfig &version;

FcStrCopy

duplicate a string

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrCopy
    		const FcChar8 *s

## Description

Allocates memory, copies `s` and returns the resulting buffer. Yes, this is `strdup`, but that function isn't available on every platform.

FcStrDowncase

3 Fontconfig &version;

FcStrDowncase

create a lower case translation of a string

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrDowncase
    		const FcChar8 *s

## Description

Allocates memory, copies `s`, converting upper case letters to lower case and returns the allocated buffer.

FcStrCopyFilename

3 Fontconfig &version;

FcStrCopyFilename

create a complete path from a filename

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrCopyFilename
    		const FcChar8 *s

## Description

`FcStrCopyFilename` constructs an absolute pathname from `s`. It converts any leading '~' characters in to the value of the HOME environment variable, and any relative paths are converted to absolute paths using the current working directory. Sequences of '/' characters are converted to a single '/', and names containing the current directory '.' or parent directory '..' are correctly reconstructed. Returns NULL if '~' is the leading character and HOME is unset or disabled (see `FcConfigEnableHome`).

FcStrCmp

3 Fontconfig &version;

FcStrCmp

compare UTF-8 strings

    #include <fontconfig/fontconfig.h>

    	    int FcStrCmp
    		const FcChar8 *s1
    		const FcChar8 *s2

## Description

Returns the usual <0, 0, >0 result of comparing `s1` and `s2`.

FcStrCmpIgnoreCase

3 Fontconfig &version;

FcStrCmpIgnoreCase

compare UTF-8 strings ignoring case

    #include <fontconfig/fontconfig.h>

    	    int FcStrCmpIgnoreCase
    		const FcChar8 *s1
    		const FcChar8 *s2

## Description

Returns the usual <0, 0, >0 result of comparing `s1` and `s2`. This test is case-insensitive for all proper UTF-8 encoded strings.

FcStrStr

3 Fontconfig &version;

FcStrStr

locate UTF-8 substring

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrStr
    		const FcChar8 *s1
    		const FcChar8 *s2

## Description

Returns the location of `s2` in `s1`. Returns NULL if `s2` is not present in `s1`. This test will operate properly with UTF8 encoded strings.

FcStrStrIgnoreCase

3 Fontconfig &version;

FcStrStrIgnoreCase

locate UTF-8 substring ignoring ASCII case

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrStrIgnoreCase
    		const FcChar8 *s1
    		const FcChar8 *s2

## Description

Returns the location of `s2` in `s1`, ignoring case. Returns NULL if `s2` is not present in `s1`. This test is case-insensitive for all proper UTF-8 encoded strings.

FcStrPlus

3 Fontconfig &version;

FcStrPlus

concatenate two strings

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrPlus
    		const FcChar8 *s1
    		const FcChar8 *s2

## Description

This function allocates new storage and places the concatenation of `s1` and `s2` there, returning the new string.

FcStrFree

3 Fontconfig &version;

FcStrFree

free a string

    #include <fontconfig/fontconfig.h>

    	    void FcStrFree
    		FcChar8 *s

## Description

This is just a wrapper around free(3) which helps track memory usage of strings within the fontconfig library.

FcStrDirname

3 Fontconfig &version;

FcStrDirname

directory part of filename

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrDirname
    		const FcChar8 *file

## Description

Returns the directory containing `file`. This is returned in newly allocated storage which should be freed when no longer needed.

FcStrBasename

3 Fontconfig &version;

FcStrBasename

last component of filename

    #include <fontconfig/fontconfig.h>

    	    FcChar8 * FcStrBasename
    		const FcChar8 *file

## Description

Returns the filename of `file` stripped of any leading directory names. This is returned in newly allocated storage which should be freed when no longer needed.