mdraw_per_char_extents(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 mdraw_per_char_extents β€” m17n Library, section 3m17n 🌸

okay bestie, gather round, because we're about to get extremely cozy with the m17n Library's little per-character measuring machine πŸ’– no cap, it's lowkey the moment your text gets measured letter by letter and honestly? it's giving meticulous. ✨


✨ NAME ✨

mdraw_per_char_extents β€” it's the function that does the thing πŸŽ€ (and yes, the original NAME section literally just leaves it at the dash, so we're keeping that energy πŸ’…)


πŸ¦‹ SYNOPSIS πŸ¦‹

void mdraw_per_char_extents (MFrame * frame, MText * mt, MDrawMetric *
array_return, MDrawMetric * overall_return)

that's the whole vibe. four args, no return value, just pure measurement main character energy πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

Obtain per character dimension information. Periodt. That's the whole job description.

So here's the tea 🍡 β€” mdraw_per_char_extents() computes the text dimension of each character in the M-text mt. The faces given as text properties in mt and the default face of frame frame determine the fonts to draw the text. iykyk, the frame matters. 🫢

Then each successive element in array_return gets set to the drawn metrics of successive characters β€” and that's relative to the origin of the drawing, plus a rectangle for each character in mt. literally every single character gets its own lil rectangle. iconic. ✨

⚠️ bestie, listen β€” the number of elements of array_return must be equal to or greater than the number of characters in mt. Not less. Never less. Do not play with this. πŸ’€

And if the pointer overall_return is not NULL, this function also computes the extents of the overall text and stores the results in the members of the structure pointed to by overall_return. So you get the whole squad's total, not just the individuals. ate. πŸ”₯


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


okay that's the whole page, no notes πŸ’… Version 1.8.4, dated Mon Sep 25 2023 β€” mwah, love u, go measure some characters bestie πŸŒˆβ­πŸ’œ

πŸ“¦ where this page comes from