ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Dotted characters
Date: Sat, 20 Aug 2016 14:35:09 +0200	[thread overview]
Message-ID: <57B84E7D.2070806@gmail.com> (raw)
In-Reply-To: <op.ymhs4kstf14xzu@lkzd-2013>


[-- Attachment #1.1: Type: text/plain, Size: 1263 bytes --]

> Lukáš Procházka <mailto:LPr@pontex.cz>
> 20. August 2016 um 14:03
> Hello again,
>
> the dotted font works perfectly.
>
> I'm using Lua to generate sheets from a database which contains 
> word-picture-picture2 records (see attached single page sample; I had 
> to convert the image to .jpg to reduce file size).
>
> One more question - is there a ConTeXt/Lua function which would assign 
> a non-diacritical-character to that with diacritics, like:
>
> Á => A
> Š => S
> Ý => Y etc.?
>
> I'm asking as the "Trace Font for Kids" doesn't contain characters 
> with diacritics...
>
> Simple Lua table would do the job, like
>
> ----
> remove_dia_czech =
> { ["é"] = "e",
>   ["š"] = "s",
>   ...
> }
> ----
>
> But string pattern in Lua with cp1250/UTF-8 might not be so easy as 
> Lua pattern "." matches single char (or - better - one byte - I 
> guess), so with UTF-8, chars with diacritics need more bytes; so the code
>
> ----
> str = ("Řetězec with diacritics"):gsub(".", remove_dia_czech)
> ----
>
> probably won't work.
>
> And Ctx Lua could have a mechanism already...
You can use the “characters.shaped” function which is described in 
cld-mkiv.pdf at page 87 and 119.

\starttext
Řetězec = \cldcontext{characters.shaped("Řetězec")}
\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2313 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2016-08-20 12:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16  7:17 Procházka Lukáš Ing.
2016-08-16  7:43 ` Taco Hoekwater
2016-08-16  7:54   ` Hans Hagen
2016-08-16  8:25     ` Procházka Lukáš Ing.
2016-08-16  8:24   ` Procházka Lukáš Ing.
2016-08-20 12:03   ` Lukáš Procházka
2016-08-20 12:35     ` Wolfgang Schuster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57B84E7D.2070806@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).