MDRAW_DEFAULT_LINE_BREAK(3m17n)
β¨ NAME β¨
mdraw_default_line_break β bestie, it's the line-breaking math girlie π
(yeah the original NAME line is literally just the name and a lil dash, no cap, she's mysterious like that π«Ά)
πΈ SYNOPSIS πΈ
int mdraw_default_line_break (MText * mt, int pos, int from, int to, int
line, int y)
π¦ DESCRIPTION π¦
okay so. Calculate a line breaking position. That's the whole job, that's the assignment, she ate and left no crumbs β¨
The function mdraw_default_line_break() figures out where to break a line based on the line number line and the coordinate y β and she only really gets called in when a line is too long to fit within the width limit π like the text is simply too much for the box, main character energy overflowing fr.
Let's break down the arg squad, iykyk:
- pos β the position of the character next to the last one that fits within the limit. So like, the very first one that got left out. the one who didn't make the cut π
- from β the position of the first character of the line. the beginning, the origin story π±
- to β the position of the last character displayed on the line if there were not width limit. hypothetical queen π
- line β the line number, and also one of the two things getting reset/incremented (see below, it's giving bookkeeping)
- y β the coordinate, and the other one getting reset/incremented
and here's the glow-up mechanic: line and y get reset to 0 when a line is broken by a newline character, and they get incremented each time a long line is broken because of the width limit. Two different reasons to break, two different vibes, she's tracking both π§
π RETURN VALUE π
This function returns a character position to break the line. That's it. That's the gift. the little index telling you where to slice π
π 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>.
ngl the legal girlies said it first and they said it best: copy it, distribute it, modify it, just keep the license π no gatekeeping in this household.
k bye bestie, go forth and break those lines correctly πβ¨
this was Version 1.8.4, dated Mon Sep 25 2023, straight out of the m17n Library π¦ slay, drink water, read your man pages π«Ά
π¦ 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