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

Mikhail V mikhailwas at gmail.com
Sun Mar 26 15:25:16 EDT 2017


On 26 March 2017 at 20:10, Steve D'Aprano <steve+python at pearwood.info> wrote:
> On Mon, 27 Mar 2017 03:57 am, Mikhail V wrote:
>
> [...]
>>>> 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)
>
> Don't be silly. It took me ten seconds on Google to find this:
>
> https://birdfont.org/
>

It takes you ten seconds to Google, and what if I ask you
to take, say Courier New font TTF file (which includes not only
vector information but all that is responsible for bitmap
rendering, subpixeling, etc), then edit one character (and
all corresponding information for subpixeling),
then compile it as a new font, then install it on Win,
without that making any conflicts, and without _any_
further glitches or changes in other characters, and no such
things across all applications.
If you'd try that, and you will succeed, _then_ I will publicly admit
that I was silly.

And paying even 50$ for correcting one glyph... well
probably I'll do it if one gives guarantee that all above
will work.

>
>>> 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.
>
> Why? Because you think you know better than the thousands of professionals
> who have worked with text formats for decades?

Sounds provocative, but yes, in some cases I know what I am
doing ;-).
But that is not because professionals does not know,
there are many other aspects which come in play here.
It depends on the use case, Unicode solves only some
problems.
I was talking only about _my own_ usage, it
will be obviously incompatible e.g. for copy-pasting
between othr apps.
There are benefits to store language-specific values (+ their glyphs)
in separate stacks.
Anyway this discussion will require concrete
examples and much deeper investigation.

>
>> And for own standalone app, I would not use any TTF or
>> anything vector-based font, since why?
>
> Right, because your users will *love* to see their native language displayed
> in a crappy bitmapped font with jagged or blurry edges.
>

I am working on text rendering algorithms an have prototyped
several bitmap-based text rendering algorithms,
both managed and prerendered approaches, and there
is _nothing_ jagged or [incorrectly] blurred there, when
one knows what he's doing of course.
So it would be _very_ hard to catch me on incompetence
here, but you can try, and feel free to do it :))))

FYI vector-based fonts were mainly motivated by print design.
Modern GPUs have capabilities for fast vector
glyph rendering, but it is not needed for screen rendering,
much less when higher DPI displays will prevale.

Mikhail


More information about the Python-list mailing list