mdraw_glyph_list(3m17n)
β¨ mdraw_glyph_list β¨
okay so bestie, you know how a string of text is not just a string of text β it's a whole lil lineup of glyphs waiting to be drawn? yeah. this is the function that gives you the receipts on that lineup. it lives in The m17n Library and its manual page is mdraw_glyph_list(3m17n). π
πΈ SYNOPSIS πΈ
int mdraw_glyph_list (MFrame * frame, MText * mt, int from, int to,
MDrawControl * control, MDrawGlyph * glyphs, int array_size, int *
num_glyphs_return)
π¦ DESCRIPTION π¦
so like, the whole point of mdraw_glyph_list() is to compute information about a glyph sequence. it's giving detective energy, fr fr. π
here's the tea: it figures out the info about all the glyphs that correspond to the text sitting between from and to inside the M-text mt β but only for the specific scenario where that text is drawn onto a window of the frame frame using the mdraw_text_with_control() function, with the drawing control object control in charge. π
glyphs is an array of objects where all that info gets stored, and array_size is, you guessed it, the size of that array. π
now, two possible endings, and honestly both are valid:
- if
array_sizeis big enough to cover all the glyphs β slay! β¨ it stores the number of actually filled elements in the place pointed to bynum_glyphs_return, and returns0. that's the happy ending. - otherwise (the array was too smol, tragic π) β it stores the required array size in the place pointed to by
num_glyphs_return, and returns-1. so you get told exactly how much room you need, no guessing.
lowkey important:-1is not an error vibe, it's a "hey, your array needs to be this big" vibe. readnum_glyphs_returnand come back with a bigger array, periodt. π
π SEE ALSO π
MDrawGlyphβ the glyph object in question, go say hi to it
π 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>.
and that's the whole page, bestie π«Ά this was Version 1.8.4, dated Mon Sep 25 2023, and it's filed under mdraw_glyph_list(3m17n). no cap, go draw some glyphs. π
β¨π
π¦ 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