UNIGENWIDTH(1)

πŸ“¦
version 17.0.04 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, debian trixie, fedora 43, fedora 44, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– UNIGENWIDTH(1) πŸ’–

okay bestie, so this is a page from the General Commands Manual, and it's literally all about unigenwidth. sit down, grab a boba, we're generating some C code 🧚


✨ NAME ✨

unigenwidth β€” generate C code for POSIX wcwidth and wcswidth functions

like, it makes the C code. that's the whole gig. slay.


🌸 SYNOPSIS 🌸

unigenwidth unifont.hex combining.txt > wccode.c

πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the vibe: unigenwidth reads a whole collection of glyphs in Unifont's .hex format, and then it reads a list of combining characters as a hexadecimal list. two files in, magic out πŸ’…

from these two files it produces C code to implement the POSIX wcwidth(3) and wcswidth(3) functions. and the format of these definitions? it's based upon POSIX 1003.1-2008 System Interfaces, pages 2251 and 2241, respectively. no cap, that's literally the spec pages it's pulling from πŸ“–


πŸ¦‹ EXAMPLE πŸ¦‹

sample usage, bestie, here it is:

unigenwidth unifont.hex combining.txt > wccode.c

it's giving "one line and you're done" energy fr fr ✨


🌈 FILES 🌈

  • *.hex files β€” for Unifont glyph data πŸ’–
  • combining.txt β€” for combining code points πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

your girl's whole friend group, periodt:


πŸ’œ AUTHOR πŸ’œ

unigenwidth was written by Paul Hardy. king behavior tbh πŸ‘‘


πŸ’… 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.

like yes, free software, we love to see it 🫢


😭 BUGS 😭

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

bestie. listen. it does NOT do extensive error checking on its input files. so if you feed it something cursed, it's not gonna catch you. you have been warned πŸ’€

and that's the whole page! this one's from 2013 Sep 10 β€” shoutout to the General Commands Manual for hosting it, mwah πŸ’‹ βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from