ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* strutheight and (german) umlauts
@ 2006-08-28 15:03 Peter Rolf
  2006-08-28 19:43 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Rolf @ 2006-08-28 15:03 UTC (permalink / raw)


Hi,

I just run into the problem, that \strutheight is lower than the height
of some german umlauts (ÄÖÜ).

% -----
\setupoutput[pdftex]
\mainlanguage[german]

\setupcolors[state=start]

\starttext
\showstruts

\def\FOO#1{\framed[frame=off,background=color,backgroundcolor=green]{#1\strut}}

\hbox{\FOO{AOU}\FOO{ÄÖÜ}}

\stoptext
% -----

Is this intended (and if so, why)?

I need this for several boxes with a mp overlay as background and
centered text. The height of the boxes is equal, so all text should be
placed on the same baseline. Currently I box the text and set the height
manually to \strutheight. But a more "global" solution would be prefered.
Should I define my own gfx strut or just add one of those umlauts to
\setfontstrut or ...? Dunno what is the best solution.

Greetings, Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: strutheight and (german) umlauts
  2006-08-28 15:03 strutheight and (german) umlauts Peter Rolf
@ 2006-08-28 19:43 ` Hans Hagen
  2006-08-28 20:42   ` Peter Rolf
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2006-08-28 19:43 UTC (permalink / raw)


Peter Rolf wrote:
> Hi,
>
> I just run into the problem, that \strutheight is lower than the height
> of some german umlauts (���).
>
> % -----
> \setupoutput[pdftex]
> \mainlanguage[german]
>
> \setupcolors[state=start]
>
> \starttext
> \showstruts
>
> \def\FOO#1{\framed[frame=off,background=color,backgroundcolor=green]{#1\strut}}
>
> \hbox{\FOO{AOU}\FOO{���}}
>
> \stoptext
> % -----
>
> Is this intended (and if so, why)?
>
> I need this for several boxes with a mp overlay as background and
> centered text. The height of the boxes is equal, so all text should be
> placed on the same baseline. Currently I box the text and set the height
> manually to \strutheight. But a more "global" solution would be prefered.
> Should I define my own gfx strut or just add one of those umlauts to
> \setfontstrut or ...? Dunno what is the best solution.
>   
(1) increase the lineheight (2.8ex by default) 
(2) change the height/depth ration (.72/.28 by default) 

it all depends on the font 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: strutheight and (german) umlauts
  2006-08-28 19:43 ` Hans Hagen
@ 2006-08-28 20:42   ` Peter Rolf
  2006-08-28 21:37     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Rolf @ 2006-08-28 20:42 UTC (permalink / raw)


Hans Hagen wrote:
> Peter Rolf wrote:
>> Hi,
>>
>> I just run into the problem, that \strutheight is lower than the height
>> of some german umlauts (���).
>>
>> % -----
>> \setupoutput[pdftex]
>> \mainlanguage[german]
>>
>> \setupcolors[state=start]
>>
>> \starttext
>> \showstruts
>>
>> \def\FOO#1{\framed[frame=off,background=color,backgroundcolor=green]{#1\strut}}
>>
>> \hbox{\FOO{AOU}\FOO{���}}
>>
>> \stoptext
>> % -----
>>
>> Is this intended (and if so, why)?
>>
>> I need this for several boxes with a mp overlay as background and
>> centered text. The height of the boxes is equal, so all text should be
>> placed on the same baseline. Currently I box the text and set the height
>> manually to \strutheight. But a more "global" solution would be prefered.
>> Should I define my own gfx strut or just add one of those umlauts to
>> \setfontstrut or ...? Dunno what is the best solution.
>>   
> (1) increase the lineheight (2.8ex by default) 
> (2) change the height/depth ration (.72/.28 by default) 
> 
> it all depends on the font 
> 
I know not much about this stuff, so thanks for the helpful answer.

Peter

> Hans 
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: strutheight and (german) umlauts
  2006-08-28 20:42   ` Peter Rolf
@ 2006-08-28 21:37     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2006-08-28 21:37 UTC (permalink / raw)


Peter Rolf wrote:
> Hans Hagen wrote:
>   
>> Peter Rolf wrote:
>>     
>>> Hi,
>>>
>>> I just run into the problem, that \strutheight is lower than the height
>>> of some german umlauts (���).
>>>
>>> % -----
>>> \setupoutput[pdftex]
>>> \mainlanguage[german]
>>>
>>> \setupcolors[state=start]
>>>
>>> \starttext
>>> \showstruts
>>>
>>> \def\FOO#1{\framed[frame=off,background=color,backgroundcolor=green]{#1\strut}}
>>>
>>> \hbox{\FOO{AOU}\FOO{���}}
>>>
>>> \stoptext
>>> % -----
>>>
>>> Is this intended (and if so, why)?
>>>
>>> I need this for several boxes with a mp overlay as background and
>>> centered text. The height of the boxes is equal, so all text should be
>>> placed on the same baseline. Currently I box the text and set the height
>>> manually to \strutheight. But a more "global" solution would be prefered.
>>> Should I define my own gfx strut or just add one of those umlauts to
>>> \setfontstrut or ...? Dunno what is the best solution.
>>>   
>>>       
>> (1) increase the lineheight (2.8ex by default) 
>> (2) change the height/depth ration (.72/.28 by default) 
>>
>> it all depends on the font 
>>
>>     
> I know not much about this stuff, so thanks for the helpful answer.
>   
the .72/.28 and 2.8ex work quite wel for most fonts as well as math; they originate in the inrstex macro package that we used long ago (just before we started writing context, which for some time used snippets of the rather modular inrstex) 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-28 21:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-28 15:03 strutheight and (german) umlauts Peter Rolf
2006-08-28 19:43 ` Hans Hagen
2006-08-28 20:42   ` Peter Rolf
2006-08-28 21:37     ` Hans Hagen

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).