# [NTG-context] Underbar offset

Hans Hagen pragma at wxs.nl
Thu May 26 18:17:30 CEST 2016

On 5/26/2016 2:48 PM, Mojca Miklavec wrote:
> On 25 May 2016 at 17:35, Wolfgang Schuster wrote:
>>
>> With \shiftup the line under the raised text stays at the same position.
>>
>> \starttext
>> \underbar{Test this \shiftup{®}}
>> \stoptext
>
> When has \shiftup been implemented?
>
> It doesn't work in TeX Live (or maybe I forgot to update TL to the

it has always been there but recently i saw that when i had updated some
low level stuff (to new luatex) i had forgotten something, so i fixed that

> Nevertheless this doesn't entirely solve the problem. I now have a
> problem with the following:
>
>     \catcodeč=\active
>     \defč{\buildtextaccent\textcaron c}

doesn't the compose=yes feature work?

>     \underbar{Test this č}
>
> I will try to remember how to fix the font on the fly with lua (or
> perhaps figure out how to edit the font; it's a commercial font
> though, so fixing it "on the fly" would probably be better).
>
> I will also test some other piece of code that Hans sent me off-list.
> (I seem to remember that there must be some tens of ways to underline
> text. Every now and then Hans sends a new demo.)

so let's give you another piece

\startluacode
name = "mojca",
type = "multiple",
prepend = true,
data = {
["č"] = { 0x30C, "c" },
}
}
name = "kern",
type = "pair",
data = {
[0x30C] = { c = { { 500, 0, 0, 0 }, false } },
}
}
\stopluacode

\definefontfeature[default][default][mojca=yes]

\showframe

\starttext

mojča miklave\utfchar{"30C}c

\stoptext

(actually it uncovered a buglet but i suppose the č never is the first
char so ...)

Hans

-----------------------------------------------------------------
`