UNIHEXROTATE(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

πŸ’« UNIHEXROTATE(1) πŸ’«

okay bestie, welcome to the General Commands Manual section, because today we're rotating Unifont hex glyphs and honestly? it's giving geometry slay πŸŽ€


✨ NAME ✨

unihexrotate β€” rotate Unifont hex glyphs in quarter turn increments πŸŒ€


🌸 SYNOPSIS 🌸

unihexrotate [-n quarter-turns] [input-font.hex] > output-font.hex

πŸ’– DESCRIPTION πŸ’–

So here's the vibe, bestie: unihexrotate reads a GNU Unifont .hex format file that you name on the command line, or it takes input from stdin if you don't give it a filename at all. no filename? no problem, it just reads what you pipe in 🫢

If you specify a number of quarter turns, it rotates each glyph clockwise by that many quarter turns β€” or counterclockwise if the number is negative. yes, negative numbers are just "go the other way" energy πŸ’…

The resulting modified .hex file gets written to stdout. and if you're wondering what a .hex file even is, the format is described over in the unifont(5) man page. go read it, it's iconic ✨

If you don't specify a number of quarter turns at all, unihexrotate will rotate each glyph by a default value of one quarter turn β€” that's 90 degrees β€” clockwise. the default is defaulting, periodt πŸ’«

okay now here's the important limit, and I need you to actually hear me on this one: unihexrotate only supports Unifont .hex files with glyphs that are 8 columns and 16 columns wide. that's the whole menu, no substitutions πŸ™ˆ

If an 8-column glyph is rotated, it is first centered within a 16-column glyph, so the rotation will be performed on a 16-by-16 pixel glyph. the way that it just pads you into a bigger canvas first... obsessed 😭

Oh and one additional use of this program? you can convert a glyph from 8 columns wide to 16 columns wide by specifying a rotation of 0 quarter turns. zero rotation, maximum glow-up. main character energy fr fr πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -n β€” Specify an integer number of quarter turn clockwise rotations to perform. typically you'd write it as "-n 0" through "-n 3" (or alternatively as "-n=0" through "-n=3") for rotations of 0, 90, 180, or 270 degrees, respectively. and if you pass negative values? those will perform counterclockwise rotations by the specified number of quarter turns. go off, negative numbers πŸ”₯

🌈 EXAMPLES 🌈

🌟 Example one: the Mongolian glow-up

This example extracts the Mongolian glyphs in the "unifont-base.hex" file (which lives in the "font/plane00" directory) and pipes them to unihexrotate to rotate by the default amount of one quarter turn clockwise (i.e., by 90 degrees).

The basic Mongolian glyphs are in the Unicode range U+1800 through U+18AF. The original glyphs in "unifont-base.hex" are drawn for horizontal rendering (as per the Unicode Standard). The output rotated glyphs are suitable for rendering Mongolian in its traditional vertical form. and because no filename is specified to unihexrotate in this example, its input is taken from stdin. classic stdin behavior, we love her πŸ’œ

grep "^18[0-A]" unifont-base.hex | unihexrotate > vertical.hex

🌟 Example two: the undo, but make it counterclockwise

The next example reverses the rotation performed above, by one quarter turn counterclockwise. in this one, the input filename "vertical.hex" is specified. look at us, using an actual filename like a grown-up πŸŽ€

unihexrotate -n -1 vertical.hex > horizontal.hex

πŸ¦‹ FILES πŸ¦‹

  • Unifont .hex format input and output files.

⭐ SEE ALSO ⭐

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

(that's the whole friend group, say hi to all of them πŸ’–)


πŸ‘‘ AUTHOR πŸ‘‘

unihexrotate was written by David Corbett. thank you king 🫢


πŸŽ€ LICENSE πŸŽ€

unihexrotate is Copyright Β© 2019 David Corbett.

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 bugs exist.

(not me checking the bug tracker and finding it absolutely immaculate 😭 clean sweep, no cap)


and that's the whole page, bestie!! this was UNIHEXROTATE(1) from the General Commands Manual, dated 2019 Feb 23. rotate responsibly, stay slay, and may all your glyphs be perfectly square βœ¨πŸŒΈπŸ’…

πŸ“¦ where this page comes from