ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: "Idris Samawi Hamid ادريس سماوي حامد" <ishamid@colostate.edu>
Cc: "mailing list for ConTeXt users" <ntg-context@ntg.nl>,
	"\"H. Özoguz\"" <h.oezoguz@mmnetz.de>
Subject: Re: Non-breaking spaces
Date: Wed, 17 Apr 2013 16:51:37 +0200	[thread overview]
Message-ID: <516EB6F9.8010603@wxs.nl> (raw)
In-Reply-To: <op.wvovwla4pw6hmh@ishamid-pc>

On 4/17/2013 4:30 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:
> On Wed, 17 Apr 2013 07:56:41 -0600, Hans Hagen <pragma@wxs.nl> wrote:
>
>>
>> On 4/17/2013 3:30 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:
>>> Hi Hans,
>>>
>>> These commands are good to know!
>>>
>>> On Wed, 17 Apr 2013 07:16:41 -0600, Hans Hagen <pragma@wxs.nl> wrote:
>>>
>>>> \narrownobreakspace
>>>
>>> If a font does not have U+202F defined, what's the best way to redefine
>>> this to, say, one half of the current font's regular space U+0020 (with
>>> no shrinking or stretching of course).
>>
>> it has nothing to do with fonts ... they are not characters bound to
>> glyphs .. independent so to say ... dealt with at another level
>
> In spac-chr.mkiv there is
>
> Line 73: \edef\narrownobreakspace      {\normalUchar"202F}
>
> So in the preamble we have to do something like (spac-hor.mkiv, line 905)
>
> \edef\narrownobreakspace{\penalty\plustenthousand\kern .7ex}

why redefine it? just keep it as is ... such an utf char automagically 
in mkiv becomes a combination of kern / skip / penalty ... if you start 
redefining yourself it also gets out of control when it's passed around

don't worry about how that happens (just assume the abstraction is taken 
care of)

> Then I can say, e.g.
>
> \defineactivecharater + {\narrownobreakspace}
>
> و+الباب
>
> (untested, but on my list)

> But per the current definition I should be able to define U+"202F as,
> e.g., .7ex in the font and get the same effect, right?

why make a character active and let it expand to itself as letter?

normally the font handler never sees that character as there is no 
character -> glyph issue involved

just insert the utf character as-is

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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:[~2013-04-17 14:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  7:08 "H. Özoguz"
2013-04-17 13:16 ` Hans Hagen
2013-04-17 13:30   ` Idris Samawi Hamid ادريس   سماوي حامد
2013-04-17 13:56     ` Hans Hagen
2013-04-17 14:30       ` Idris Samawi Hamid ادريس   سماوي حامد
2013-04-17 14:51         ` Hans Hagen [this message]
2013-04-17 15:28           ` Idris Samawi Hamid ادريس   سماوي حامد
2013-04-17 15:35             ` Hans Hagen
2013-04-17 20:26               ` Idris Samawi Hamid ادريس   سماوي حامد
2013-04-17 14:34 ` Idris Samawi Hamid ادريس   سماوي حامد
2013-04-18  6:21 "H. Özoguz"

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=516EB6F9.8010603@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=h.oezoguz@mmnetz.de \
    --cc=ishamid@colostate.edu \
    --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).