From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95875 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Dotted characters Date: Sat, 20 Aug 2016 14:35:09 +0200 Message-ID: <57B84E7D.2070806@gmail.com> References: <0FCC6C71-7BD9-49C3-9FEC-784DF4BD9175@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0494135293618821940==" X-Trace: blaine.gmane.org 1471696547 10190 195.159.176.226 (20 Aug 2016 12:35:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 Aug 2016 12:35:47 +0000 (UTC) User-Agent: Postbox 4.0.8 (Macintosh/20151105) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 20 14:35:43 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bb5V0-0002OZ-5W for gctc-ntg-context-518@m.gmane.org; Sat, 20 Aug 2016 14:35:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 25FD215308; Sat, 20 Aug 2016 14:35:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 41oM4MgMy2rW; Sat, 20 Aug 2016 14:35:27 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 82CE11530F; Sat, 20 Aug 2016 14:35:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C4E631530B for ; Sat, 20 Aug 2016 14:35:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k_h5dy2j_Eh4 for ; Sat, 20 Aug 2016 14:35:25 +0200 (CEST) Original-Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 392DD15308 for ; Sat, 20 Aug 2016 14:35:15 +0200 (CEST) Original-Received: by mail-wm0-f52.google.com with SMTP id f65so64642270wmi.0 for ; Sat, 20 Aug 2016 05:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=TDYuUI+ieOj4u2aHS8VxnnJ/Buex1/GO/AY3//HjGt8=; b=DvU0s2TZLEE4YPQFP/B0Ab5MkiajSfK+JHtzDZrgXq+GYX+6ykjZeQ0IPHGUVcE7NK 6+9BLqHCCNcY+6qMdcYZ/11S+4gDmhVKRQ72doPEZZte3lmIuZmeKzFveFYZpxdAOsbr AKAfn6ZAYNyACgYVue/BwO9XleUUjJATqTkVVyvOqeUiKVYp5HFKlKhFffmTzhAb3hI2 W1CFfnwCE9WM9drWRJ4s1D4CYrjtlBvkF4HDmhpdsTy9L/j5dhydz3AYeZR5SiTIzOQF hocRLPXiJdomgg4PUL4EJdbCHc5RoJDo2j4lWLzjtz4/3QSD5hIbEGkovJsTH3pCtbKy r8Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=TDYuUI+ieOj4u2aHS8VxnnJ/Buex1/GO/AY3//HjGt8=; b=ZOwE22gPcnsM2RAWGjh+QuYIUOHv8YXIfUyqgbxKwPgbtXPhLpnoCxCWKxWayPj9lr 1BFXkGLzzR+6NNTKhY3waUqP7ZZ/7wRS7+QpZtt2F03Zf/DZ/gKByHXiZvsLelh3a2g7 /yHjd/rW3ejVLL2HIcdOKLXTcdgzT8aRswMLBdgWZLSqH+/Zq0nj6SWP0VUslJpqEwuI hcarHgxlDWyY3Mzn3Gu8gwfQArmAOWFfqUCVMwOFCsQIjqYkNU2SsxoUbVcoCovQaGHU BJqDfnrIqzcSEFM5ES9LXW7HMukmPkZg7ONx+fQXqqo+3MJnWwyUvPBg+JQ25yIO6Dgl JoVw== X-Gm-Message-State: AEkooustgUuquOdVGoGaXaJ2c+W1lEZPsutxzmIbnn1l++oiRFMU1BNBiNuvvTepa16XPg== X-Received: by 10.194.235.166 with SMTP id un6mr9949220wjc.169.1471696513464; Sat, 20 Aug 2016 05:35:13 -0700 (PDT) Original-Received: from keima.localdomain (x2f21bc6.dyn.telefonica.de. [2.242.27.198]) by smtp.gmail.com with ESMTPSA id ly9sm11752668wjb.44.2016.08.20.05.35.11 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 20 Aug 2016 05:35:12 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:95875 Archived-At: This is a multi-part message in MIME format. --===============0494135293618821940== Content-Type: multipart/alternative; boundary="------------030204070002000009040100" This is a multi-part message in MIME format. --------------030204070002000009040100 Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 8bit > Lukáš Procházka > 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 --------------030204070002000009040100 Content-Type: text/html; charset=windows-1250 Content-Transfer-Encoding: 8bit
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
--------------030204070002000009040100-- --===============0494135293618821940== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0494135293618821940==--