Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3725

Re: Printing UTF8 (Unicode)

From Carlos <carlos@cvkm.cz>
Newsgroups comp.lang.postscript
Subject Re: Printing UTF8 (Unicode)
Date 2022-01-21 14:23 +0100
Message-ID <20220121142303.00000241@cvkm.cz> (permalink)
References <4fe53d50-e66a-82b8-48fd-d0928e149698@davidnewall.com>

Show all headers | View raw


David Newall <davidn@davidnewall.com>:

> Hello All,
> 
> I've written some PostScript to allow me to print UTF8-encoded
> strings:

This is great!

[...]
> % print a single unicode codepoint:
> % integer unicodeshow -
> /unicodeshow {
[...]
> /utfshow {
>    UTF8_ACCEPT 0 UTF8_ACCEPT % prev codep current
>    4 -1 roll {
>      decode
>      dup UTF8_ACCEPT eq { 1 index unicodeshow } if
[...]

Doesn't "x glyphshow y glyphshow" lose the kerning between x and y?
(I'm not really sure)

If it does, an alternative could be to create a (probably composite)
temporary font out of the characters used in the string and "show" a
reencoded string using that font. Too complicated though :)

Carlos.

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Printing UTF8 (Unicode) David Newall <davidn@davidnewall.com> - 2022-01-21 21:56 +1100
  Re: Printing UTF8 (Unicode) Carlos <carlos@cvkm.cz> - 2022-01-21 14:23 +0100
    Re: Printing UTF8 (Unicode) David Newall <davidn@davidnewall.com> - 2022-01-22 12:27 +1100
  Re: Printing UTF8 (Unicode) David Newall <davidn@davidnewall.com> - 2022-01-23 13:31 +1100
    Re: Printing UTF8 (Unicode) Carlos <carlos@cvkm.cz> - 2022-01-23 13:35 +0100
      Re: Printing UTF8 (Unicode) David Newall <davidn@davidnewall.com> - 2022-01-26 14:59 +1100
        Re: Printing UTF8 (Unicode) Carlos <carlos@cvkm.cz> - 2022-02-10 15:05 +0100
          Re: Printing UTF8 (Unicode) David Newall <davidn@davidnewall.com> - 2022-02-16 13:55 +1100
  Printing UTF8 (Unicode) - opinions please David Newall <davidn@davidnewall.com> - 2022-01-23 14:10 +1100
    Re: Printing UTF8 (Unicode) - opinions please Carlos <carlos@cvkm.cz> - 2022-01-23 13:56 +0100
      Re: Printing UTF8 (Unicode) - opinions please luser droog <luser.droog@gmail.com> - 2022-01-24 08:37 -0800
    Re: Printing UTF8 (Unicode) - opinions please luser droog <luser.droog@gmail.com> - 2022-01-24 08:33 -0800
      Re: Printing UTF8 (Unicode) - opinions please David Newall <davidn@davidnewall.com> - 2022-01-26 15:06 +1100

csiph-web