Text-mode apps (Was :Who are the "spacists"?)

Mikhail V mikhailwas at gmail.com
Sun Mar 26 12:57:17 EDT 2017


On 26 March 2017 at 17:37, Chris Angelico <rosuav at gmail.com> wrote:
> On Mon, Mar 27, 2017 at 2:17 AM, Mikhail V <mikhailwas at gmail.com> wrote:
>>>> Why? IIRC I can do good pseudographics on linux only with extended
>>>> unicode character sets, so yes it is possible, is that what you mean?
>>>
>>> No.  The same ASCII character set that was available in DOS is
>>> available in Linux without unicode.
>>
>> Ok, now I have read that one can change the encoding in the terminal
>> to get same table drawing characters (if one does not want to use
>> unicode).
>
> Just use Unicode. Everything else, these days, is a subset of Unicode
> anyway. Unless you're stuck on the default Windows shell/terminal, you
> should be able to use UTF-8 everywhere and have the entire Unicode
> range available.

Yes I am 'stuck' on Windows console, and I use it for what it is
made for - running command line tools.
On Win 7 and 10, I can see UTF-8 chars everywhere.
To be precise, to see entire range of chars, you need a _font_
in which someone have drawn those chars according to their
understanding how those glyphs must look, nothing more.

No need to say, that even for text only, monospaced cannot
represent them even close to satisfying, and for Arabic for example they
look ass ugly in monospaced.
IOW, even a console-like apps would use proportional fonts in the future.


>
>> But such a question: can one do it programmaticaly?
>
> Set everything to UTF-8 and you don't have to.
>
>> And more important: can one use binary (bitmap) fonts in default modern
>> linux console? If yes, can one patch them with custom tiles at
>> the application start?
>
> If you really need something completely custom, it's not text any
> more.

Obvious fact, but if I need e.g. rounded corners in table drawing
characters? Or I just want to fix some characters which look especially ugly?
Create a new TTF? No, thanks, this would be worst nightmare to
do without a special tool (which have prices with several zeros, otherwise
just don't work and can even break things system-wide)

>
> More likely, you don't truly need something custom - what you need is
> a different subset of characters (maybe you need to mix Latin, Greek,
> and Hebrew letters, in order to show interlinear translation of the
> Bible). Instead of messing around with character sets, you can just
> use Unicode and have all of them available.

If I was to deal with multiple language charsets in _my own_ rendering
app, I would still use discrete encoding for inner algorithms.
i.e. I would place separate charsets on separate code ranges.
And for own standalone app, I would not use any TTF or
anything vector-based font, since why?

>
>> In DOS, (I don't remember if in all versions or only some)
>> one could do all this and this opens very rich possibilities for
>> approximating of objects with tiles. The only limitations
>> that one uses 255 tiles, but even this enables to build
>> whole 'worlds' and state of the art apps. So I would call this
>> pseudographics and not few sticks and corner tiles
>> (which I cannot even define and upload easily).
>
> Yeah; if my memory serves me, this was an IBM BIOS feature, so all
> versions of DOS would be equally able to do it. But it's basically a
> form of tile graphics, not text. Given how easily graphical programs
> can be built these days, I would strongly recommend that, rather than
> abusing pseudo-text as pseudo-graphics. Pick up Tk or GTK or wxWindows
> or something, or build your app to run in a web browser, or something
> like that.

Exactly, that is why I do so, and even if one wants to play around
with console hacking, there is not so many documented
ways to do it. In Windows, I can manually select raster fonts,
so in pure theory, one could hack it with custom tiles, but
since it is much easier to use a graphical library today,
too few people are interested in it.

Mikhail



More information about the Python-list mailing list