---
name: "mfont_set_encoding"
section: "3m17n"
platform: "linux"
package: "m17n-docs"
version: "1.8.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mfont_set_encoding"
---

# mfont\_set\_encoding(3m17n)

## NAME

mfont\_set\_encoding -

## SYNOPSIS

int **mfont\_set\_encoding** (**MFont** \* *font*, MSymbol *encoding\_name*, MSymbol *repertory\_name*)

## DESCRIPTION

Set encoding of a font. The **mfont\_set\_encoding()** function sets the encoding information of font **font**.

**encoding\_name** is a symbol representing a charset that has the same encoding as the font.

**repertory\_name** is `Mnil` or a symbol representing a charset that has the same repertory as the font. If it is `Mnil`, whether a specific character is supported by the font is asked to each font driver.

## RETURN VALUE

If the operation was successful, this function returns 0. Otherwise it returns -1 and assigns an error code to the external variable **merror\_code**. \

## COPYRIGHT

Copyright (C) 2001 Information-technology Promotion Agency (IPA)\
 Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)\
 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License  \<http://www.gnu.org/licenses/fdl.html\>.
