* how to convert font size to pt number ?
@ 2008-07-12 19:48 Alan Stone
2008-07-12 20:05 ` Aditya Mahajan
0 siblings, 1 reply; 10+ messages in thread
From: Alan Stone @ 2008-07-12 19:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 189 bytes --]
style={\switchtobodyfont[somefont,somefontsize]} digests font sizes
expressed in pt.
What's the command to convert font sizes ( for example \tfc ) to their
corresponding pt number ?
Alan
[-- Attachment #1.2: Type: text/html, Size: 209 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-12 19:48 how to convert font size to pt number ? Alan Stone
@ 2008-07-12 20:05 ` Aditya Mahajan
2008-07-12 21:06 ` Alan Stone
0 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2008-07-12 20:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, 12 Jul 2008, Alan Stone wrote:
> style={\switchtobodyfont[somefont,somefontsize]} digests font sizes
> expressed in pt.
>
> What's the command to convert font sizes ( for example \tfc ) to their
> corresponding pt number ?
See http://wiki.contextgarden.net/Font_Switching#Font_sizes
Aditya
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-12 20:05 ` Aditya Mahajan
@ 2008-07-12 21:06 ` Alan Stone
2008-07-12 21:20 ` Henning Hraban Ramm
2008-07-12 22:35 ` Aditya Mahajan
0 siblings, 2 replies; 10+ messages in thread
From: Alan Stone @ 2008-07-12 21:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1033 bytes --]
Thanks for your quick response Aditya.
I've read that too and unfortunately don't find anything on that page that
answers my question.
Hmmm...
Either the question was not clear enough or I've been smoking the carpet...
:O)
Let's try to formulate it otherwise...
With somefont defined through \definetypeface[somefont][...]
style={\switchtobodyfont[somefont,huge]} gives a compile error,
only, for example, style={\switchtobodyfont[somefont,14pt]} works
like in \setuphead[chapter][style={\switchtobodyfont[somefont,14pt]}]
I don't want to manually input some pt size but, for example, the \tfc or
huge corresponding pt size.
Therefore I'm looking for
- the ConTeXtMagicCommand to convert
\ConTexTMagicCommand[\tfc or huge] to "\tfc or huge size expressed in pt"
or
- some other ConTeXtSuperMagic trick to display the chapter heading in
somefont and \tfc or huge size
I guess I could \chapter{\tfc chaptertitle}, however I'm looking for
something more generic so I only have to input chapter{chaptertitle}.
Cheers,
Alan
[-- Attachment #1.2: Type: text/html, Size: 1179 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-12 21:06 ` Alan Stone
@ 2008-07-12 21:20 ` Henning Hraban Ramm
2008-07-12 22:05 ` Wolfgang Schuster
2008-07-12 22:35 ` Aditya Mahajan
1 sibling, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2008-07-12 21:20 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 2008-07-12 um 23:06 schrieb Alan Stone:
>
> I guess I could \chapter{\tfc chaptertitle}, however I'm looking for
> something more generic so I only have to input chapter{chaptertitle}.
What's wrong with
\setuphead[chapter][style=\tfc] % or style={\tfc\yourfont}
?
Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-12 21:20 ` Henning Hraban Ramm
@ 2008-07-12 22:05 ` Wolfgang Schuster
0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2008-07-12 22:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 12.07.2008 um 23:20 schrieb Henning Hraban Ramm:
> Am 2008-07-12 um 23:06 schrieb Alan Stone:
>>
>> I guess I could \chapter{\tfc chaptertitle}, however I'm looking for
>> something more generic so I only have to input chapter{chaptertitle}.
>
>
> What's wrong with
> \setuphead[chapter][style=\tfc] % or style={\tfc\yourfont}
\definefont[chapterfont][yourfont sa 1.728]
\setuphead[chapter][style=chapterfont]
Regards,
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-12 21:06 ` Alan Stone
2008-07-12 21:20 ` Henning Hraban Ramm
@ 2008-07-12 22:35 ` Aditya Mahajan
2008-07-13 3:52 ` Aditya Mahajan
1 sibling, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2008-07-12 22:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, 12 Jul 2008, Alan Stone wrote:
> Thanks for your quick response Aditya.
>
> I've read that too and unfortunately don't find anything on that page that
> answers my question.
>
> Hmmm...
>
> Either the question was not clear enough or I've been smoking the carpet...
> :O)
I wanted to say that by default, \tfa = 1.2 times \tf size, tfb is 1.44
times \tf size, tfc = 1.728 times \tf size, tfd = 2.074 times \tf size,
and tfe = 2.488 times \tf size. So you can always use
(in a 10 point document)
\definefont[chapterfont][Sans sa 1.728]
\setuphead[chapter][style=chapterfont]
> Let's try to formulate it otherwise...
>
> With somefont defined through \definetypeface[somefont][...]
>
> style={\switchtobodyfont[somefont,huge]} gives a compile error,
> only, for example, style={\switchtobodyfont[somefont,14pt]} works
>
> like in \setuphead[chapter][style={\switchtobodyfont[somefont,14pt]}]
>
> I don't want to manually input some pt size but, for example, the \tfc or
> huge corresponding pt size.
>
>
>
> Therefore I'm looking for
>
> - the ConTeXtMagicCommand to convert
> \ConTexTMagicCommand[\tfc or huge] to "\tfc or huge size expressed in pt"
>
> or
>
> - some other ConTeXtSuperMagic trick to display the chapter heading in
> somefont and \tfc or huge size
The default values of \tfa etc can be changed by \definefont. If these
values have not been changed, then you can use:
\definefont[chapterfont][Sans sa \magfactor3]
\setuphead[chapter][style=chapterfont]
\magfactor is defined in font-ini.tex as
\def\magfactor#1%
{\ifcase#1 1.000\or1.200\or1.440\or1.728\or2.074\or2.488\or1\fi}
so \magfactor 3 is equal to \tfc in size. You can also use a more plain
TeX like syntax as
\definefont[chapterfont][Sans scaled \magstep3]
where \magstep is defined in font-ini.tex as
\def\magstep#1%
{\ifcase#1 \@m\or1200\or1440\or1728\or2074\or2488\or\@m\fi}
Aditya
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-12 22:35 ` Aditya Mahajan
@ 2008-07-13 3:52 ` Aditya Mahajan
2008-07-13 7:56 ` Alan Stone
0 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2008-07-13 3:52 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, 12 Jul 2008, Aditya Mahajan wrote:
> On Sat, 12 Jul 2008, Alan Stone wrote:
>
>> Thanks for your quick response Aditya.
>>
>> I've read that too and unfortunately don't find anything on that page that
>> answers my question.
>>
>> Hmmm...
>>
>> Either the question was not clear enough or I've been smoking the carpet...
>> :O)
>
> I wanted to say that by default, \tfa = 1.2 times \tf size, tfb is 1.44
> times \tf size, tfc = 1.728 times \tf size, tfd = 2.074 times \tf size,
> and tfe = 2.488 times \tf size. So you can always use
>
> (in a 10 point document)
This will actually work for any sized document.
> \definefont[chapterfont][Sans sa 1.728]
> \setuphead[chapter][style=chapterfont]
Aditya
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-13 3:52 ` Aditya Mahajan
@ 2008-07-13 7:56 ` Alan Stone
2008-07-13 11:16 ` Alan Stone
0 siblings, 1 reply; 10+ messages in thread
From: Alan Stone @ 2008-07-13 7:56 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 132 bytes --]
Simple solutions from generous posters. Thanks all. I was too focussed on
the switchtobodyfont command.
Have a great weekend,
Alan
[-- Attachment #1.2: Type: text/html, Size: 145 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-13 7:56 ` Alan Stone
@ 2008-07-13 11:16 ` Alan Stone
2008-07-13 12:00 ` Wolfgang Schuster
0 siblings, 1 reply; 10+ messages in thread
From: Alan Stone @ 2008-07-13 11:16 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2651 bytes --]
(1) \setupbodyfont[somebodyfont,12pt]
\definefont[chapterfont][somefont sa 1.728]
\setuphead[chapter][style=chapterfont]
gives a compile error at \chapter{chapter title} :
! Font \**chapterfont**:=somefont at 20.736pt not loadable: metric data not
found or bad
However
\setuphead[chapter][style=\tfc\somefont] works OK.
\setupbodyfont[somefont,12pt] also work OK, while
\setupbodyfont[chapterfont,12pt] defaults to LM font
Uh ?
(2) fc-list output extract
Times New
Roman:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta
Times New
Roman:style=Italic,cursiva,kurzíva,kursiv,Πλάγια,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,kursywa,Itálico,Курсив,İtalik,Poševno,nghiêng,Etzana
Times New
Roman:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiona,Negrito,Полужирный,Fet,Kalın,Krepko,đậm,Lodia
Times New Roman:style=Bold Italic,Negreta cursiva,tučné kurzíva,fed
kursiv,Fett Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu Kursivoi,Gras
Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet
Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná
kurzíva,Fet Kursiv,Kalın İtalik,Krepko poševno,nghiêng đậm,Lodi etzana
With the following typescript
\starttypescript[serif][timesnewroman]
% --- MS TrueType Core Font ---
\definefontsynonym[Dummy][name:Times New Roman][features=default]
\definefontsynonym[DummyBold][name:Times New Roman
Bold][features=default]
\definefontsynonym[DummyItalic][name:Times New Roman
Italic][features=default]
\definefontsynonym[DummyBoldItalic][name:Times New Roman Bold
Italic][features=default]
\stoptypescript
\starttypescript[serif][timesnewroman][name]
\definefontsynonym[Serif][Dummy][features=default]
\definefontsynonym[SerifBold][DummyBold][features=default]
\definefontsynonym[SerifItalic][DummyItalic][features=default]
\definefontsynonym[SerifBoldItalic][DummyBoldItalic][features=default]
\definefontsynonym[SerifSlanted][DummyItalic][features=default]
\definefontsynonym[SerifIBoldSlanted][DummyBoldItalic][features=default]
\definefontsynonym[SerifCaps][Dummy][features=default]
\stoptypescript
\definetypeface[myBodyFont][rm][serif][timesnewroman][default]
\bf displays in bold italic (??) so something is wrong/missing. Seems to be
something with the style=... stuff. Fruitlessly searched the wiki and
mailing list archive.
Alan
[-- Attachment #1.2: Type: text/html, Size: 3326 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to convert font size to pt number ?
2008-07-13 11:16 ` Alan Stone
@ 2008-07-13 12:00 ` Wolfgang Schuster
0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2008-07-13 12:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 13.07.2008 um 13:16 schrieb Alan Stone:
> (1) \setupbodyfont[somebodyfont,12pt]
> \definefont[chapterfont][somefont sa 1.728]
> \setuphead[chapter][style=chapterfont]
>
> gives a compile error at \chapter{chapter title} :
>
> ! Font \**chapterfont**:=somefont at 20.736pt not loadable: metric
> data not found or bad
somefont is only a placeholder for a real font name or a style like
Serif, Sans ...
> However
>
> \setuphead[chapter][style=\tfc\somefont] works OK.
\setuphead[chapter][style=\tfc\somefont]
\starttext
\chapter{Chapter}
\stoptext
This gives me a error message, give us working samples.
> \setupbodyfont[somefont,12pt] also work OK, while
How should we know, it's hard to give you an answer with just one line
of code.
> \setupbodyfont[chapterfont,12pt] defaults to LM font
>
> Uh ?
You have no typeface with the name 'chapterfont'.
> (2) fc-list output extract
>
> Times New
> Roman:style
> =
> Regular
> ,Normal
> ,obyčejné
> ,Standard
> ,Κανονικά
> ,Normaali
> ,Normál
> ,Normale
> ,Standaard
> ,Normalny,Обычный,Normálne,Navadno,thường,Arrunta
> Times New
> Roman:style
> =
> Italic
> ,cursiva
> ,kurzíva
> ,kursiv
> ,Πλάγια
> ,Kursivoitu
> ,Italique
> ,Dőlt
> ,Corsivo
> ,Cursief
> ,kursywa,Itálico,Курсив,İtalik,Poševno,nghiêng,Etzana
> Times New
> Roman:style
> =
> Bold
> ,Negreta
> ,tučné
> ,fed
> ,Fett
> ,Έντονα
> ,Negrita
> ,Lihavoitu
> ,Gras
> ,Félkövér
> ,Grassetto
> ,Vet
> ,Halvfet
> ,Pogrubiona
> ,Negrito,Полужирный,Fet,Kalın,Krepko,đậm,Lodia
> Times New Roman:style=Bold Italic,Negreta cursiva,tučné
> kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Negrita
> Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto
> Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito
> Itálico,Полужирный Курсив,Tučná kurzíva,Fet
> Kursiv,Kalın İtalik,Krepko poševno,nghiêng đậm,Lodi etzana
>
> With the following typescript
>
> \starttypescript[serif][timesnewroman]
> % --- MS TrueType Core Font ---
> \definefontsynonym[Dummy][name:Times New Roman]
> [features=default]
> \definefontsynonym[DummyBold][name:Times New Roman Bold]
> [features=default]
> \definefontsynonym[DummyItalic][name:Times New Roman Italic]
> [features=default]
> \definefontsynonym[DummyBoldItalic][name:Times New Roman
> Bold Italic][features=default]
> \stoptypescript
\starttypescript [serif] [timesnewroman]
\definefontsynonym [TimesNewRoman-Regular] [name:Times New
Roman] [features=default]
\definefontsynonym [TimesNewRoman-Italic] [name:Times New Roman
Italic] [features=default]
\definefontsynonym [TimesNewRoman-Bold] [name:Times New Roman
Bold] [features=default]
\definefontsynonym [TimesNewRoman-BoldItalic] [name:Times New Roman
Bold Italic] [features=default]
\stoptypescript
> \starttypescript[serif][timesnewroman][name]
> \definefontsynonym[Serif][Dummy][features=default]
> \definefontsynonym[SerifBold][DummyBold][features=default]
> \definefontsynonym[SerifItalic][DummyItalic][features=default]
> \definefontsynonym[SerifBoldItalic][DummyBoldItalic]
> [features=default]
> \definefontsynonym[SerifSlanted][DummyItalic]
> [features=default]
> \definefontsynonym[SerifIBoldSlanted][DummyBoldItalic]
> [features=default]
> \definefontsynonym[SerifCaps][Dummy][features=default]
> \stoptypescript
\starttypescript [serif] [timesnewroman]
\setups[font:fallback:serif]
\definefontsynonym [Serif] [TimesNewRoman-Regular]
\definefontsynonym [SerifItalic] [TimesNewRoman-Italic]
\definefontsynonym [SerifBold] [TimesNewRoman-Bold]
\definefontsynonym [SerifBoldItalic] [TimesNewRoman-BoldItalic]
\stoptypescript
> \definetypeface[myBodyFont][rm][serif][timesnewroman][default]
\starttypescript [timesnewroman]
\definetypeface [timesnewroman] [rm] [serif] [timesnewroman]
[default]
\stoptypescript
\usetypescript[timesnewroman]
\setupbodyfont[timesnewroman]
\starttext
text \bf text \it text \bi text
\stoptext
> \bf displays in bold italic (??) so something is wrong/missing.
> Seems to be something with the style=... stuff. Fruitlessly searched
> the wiki and mailing list archive.
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-07-13 12:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-12 19:48 how to convert font size to pt number ? Alan Stone
2008-07-12 20:05 ` Aditya Mahajan
2008-07-12 21:06 ` Alan Stone
2008-07-12 21:20 ` Henning Hraban Ramm
2008-07-12 22:05 ` Wolfgang Schuster
2008-07-12 22:35 ` Aditya Mahajan
2008-07-13 3:52 ` Aditya Mahajan
2008-07-13 7:56 ` Alan Stone
2008-07-13 11:16 ` Alan Stone
2008-07-13 12:00 ` Wolfgang Schuster
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).