---
name: "unigenwidth"
section: "1"
platform: "linux"
package: "unifont-bin"
version: "1:15.1.01-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://carta.tech/man/unigenwidth"
---

# unigenwidth(1)

Generate C code for POSIX wcwidth and wcswidth functions

## NAME

unigenwidth - Generate C code for POSIX wcwidth and wcswidth functions

## SYNOPSIS

**unigenwidth** *unifont.hex combining.txt* \> *wccode.c*

## DESCRIPTION

**unigenwidth** reads a collection of glyphs in Unifont's .hex format, then reads a list of combining characters as a hexadecimal list. From these two files, it produces C code to implement the POSIX **[wcwidth(3)](/man/wcwidth/3.md)** and **[wcswidth(3)](/man/wcswidth/3.md)** functions.  The format of these definitions is based upon POSIX 1003.1-2008 System Interfaces, pages 2251 and 2241, respectively.

## EXAMPLE

Sample usage:

unigenwidth unifont.hex combining.txt \> wccode.c

## FILES

\*.hex files for Unifont glyph data; combining.txt for combining code points.

## SEE ALSO

[**bdfimplode**(1)](/man/bdfimplode/1.md), [**hex2bdf**(1)](/man/hex2bdf/1.md), **hex2otf**(1), [**hex2sfd**(1)](/man/hex2sfd/1.md), [**hexbraille**(1)](/man/hexbraille/1.md), [**hexdraw**(1)](/man/hexdraw/1.md), [**hexkinya**(1)](/man/hexkinya/1.md), [**hexmerge**(1)](/man/hexmerge/1.md), **johab2syllables**(1), [**johab2ucs2**(1)](/man/johab2ucs2/1.md), [**unibdf2hex**(1)](/man/unibdf2hex/1.md), [**unibmp2hex**(1)](/man/unibmp2hex/1.md), [**unibmpbump**(1)](/man/unibmpbump/1.md), [**unicoverage**(1)](/man/unicoverage/1.md), [**unidup**(1)](/man/unidup/1.md), [**unifont**(5)](/man/unifont/5.md), **unifont-johab631**(5), [**unifont-viewer**(1)](/man/unifont-viewer/1.md), [**unifont1per**(1)](/man/unifont1per/1.md), [**unifontchojung**(1)](/man/unifontchojung/1.md), [**unifontksx**(1)](/man/unifontksx/1.md), [**unifontpic**(1)](/man/unifontpic/1.md), **unigen-hangul**(1), [**unigencircles**(1)](/man/unigencircles/1.md), [**unihex2bmp**(1)](/man/unihex2bmp/1.md), [**unihex2png**(1)](/man/unihex2png/1.md), [**unihexfill**(1)](/man/unihexfill/1.md), [**unihexgen**(1)](/man/unihexgen/1.md), **unihexpose**(1), [**unihexrotate**(1)](/man/unihexrotate/1.md), **unijohab2html**(1), [**unipagecount**(1)](/man/unipagecount/1.md), [**unipng2hex**(1)](/man/unipng2hex/1.md)

## AUTHOR

**unigenwidth** was written by Paul Hardy.

## LICENSE

**unigenwidth** is Copyright © 2013 Paul Hardy.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

## BUGS

No known real bugs exist, except that this software does not perform extensive error checking on its input files.
