<div dir="ltr">And stdout is not rich enough for dealing with rendering issues. The program producing text is entirely decoupled from details of how the terminal renders. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 11, 2019 at 5:23 PM Lyberta &lt;<a href="mailto:lyberta@lyberta.net">lyberta@lyberta.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Corentin Jabot:<br>
&gt;&gt; The SG16 Unicode group might even end up using &quot;Why does &lt;format&gt; not<br>
&gt;&gt; support field widths?&quot; as a teachable example, similar to how we use &quot;Why<br>
&gt;&gt; does vector not support push_front()?&quot; as a teachable example.<br>
&gt;&gt;<br>
&gt; <br>
&gt; Not unreasonable to postpone that feature imo<br>
<br>
I suggest postponing field width until C++23. Hopefully, by that time we<br>
have enough experience with both std::format and char8_t and have some<br>
proposal for Unicode streams so we know from experience what to standardize.<br>
<br>
My opinion on Unicode terminal is that for every EGC terminal has to ask<br>
the font renderer if it can render that in a single glyph. If it can&#39;t<br>
(common case for emojis with gender modifiers) then I guess decompose<br>
EGC into EGCs that can be rendered and reallocate cells for those.<br>
<br>
OR:<br>
<br>
Squeeze cells so several glyphs are in a single cell. This preserves the<br>
alignment in case of, say, table. In this case the terminal has to keep<br>
size of every column and render each EGC separately. But I would say<br>
that in all cases terminal has to render each cell separately just to<br>
prevent bugs in the rendering/layout engine.<br>
<br>
OR:<br>
<br>
Render each EGC into a temporary buffer and scale the buffer down if it<br>
is too large. This way the size of the terminal in pixels is fixed but<br>
broken EGCs will render as sequences of very small glyphs.<br>
<br>
So yeah, in all cases you have to ask layout/rendering engine to<br>
determine field width. No way around that.<br>
<br>
_______________________________________________<br>
SG16 Unicode mailing list<br>
<a href="mailto:Unicode@isocpp.open-std.org" target="_blank">Unicode@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/unicode" rel="noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/unicode</a><br>
</blockquote></div>