Skip to content

Make writing width aware so that emojis have a consistent width with padding #172

@Insomniak47

Description

@Insomniak47

Right now sometimes (depending on the font) we'll write out a line and we'll end up with the columns mismatching because even though the length of a string is x some emoji are rendered as single column and some are not (the fire emoji with the default mac font in the terminal IIRC).

When writing symbols we should check the before/after column of the terminal to determine if we've moved two full columns and then cache that value. Might just be easiest to do that in a wrapper around Console.WriteLine. To be honest we could probably just do it per line before we write the newline since that would be a good indicator though it might break down for languages with multibyte characters. Would be interesting to try it with Cyrillics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions