MDRAW_TEXT_PER_CHAR_EXTENTS(3m17n)
π NAME π
mdraw_text_per_char_extents β the lil function that measures every single character for you, one by one, no cap πβ¨
This one lives in the m17n Library besties, section 3 of the manual, so it's a library call, iykyk π
β¨ SYNOPSIS β¨
int mdraw_text_per_char_extents (MFrame * frame, MText * mt, int from,
int to, MDrawControl * control, MDrawMetric * ink_array_return,
MDrawMetric * logical_array_return, int array_size, int *
num_chars_return, MDrawMetric * overall_ink_return, MDrawMetric *
overall_logical_return)
okay that signature is long long, but she ate, periodt π
π¦ DESCRIPTION π¦
So like, this function computes the text dimensions of each character of an M-text. Iconic behaviour honestly π«Ά
The mdraw_text_per_char_extents() function computes the drawn metric of each character between from and to of M-text mt, and it does that assuming they're drawn on a window of frame frame using the mdraw_text_with_control() function with the drawing control object control. Main character energy, fr fr β¨
Now, array_size specifies the size of ink_array_return and logical_array_return. Each successive element of ink_array_return and logical_array_return gets set to the drawn ink and logical metrics of successive characters respectively β and those are relative to the drawing origin of the M-text, okay? Not random, relative to the origin π The number of elements of ink_array_return and logical_array_return that have been set gets returned to num_chars_return. Slay, everything accounted for πΈ
β οΈ okay listen bestie: ifarray_sizeis too small to return all metrics, the function returns-1and stores the requested size innum_chars_return. Otherwise, it returns zero. So like, check that return value, don't just ignore her π
If the pointers overall_ink_return and overall_logical_return are not NULL, this function also computes the metrics of the overall text and stores the results in the members of the structure pointed to by overall_ink_return and overall_logical_return. Bonus measurements, we love to see it π
If control->two_dimensional is nonzero, this function computes only the metrics of characters in the first line. That's it. First line only. No further questions π
π 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>.
okay that's the whole page bestie, you're so welcome π this was Version 1.8.4, dated Mon Sep 25 2023, and yes she's serving mdraw_text_per_char_extents(3m17n) realness, mwah π
ππ
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms