ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* (hindi) font questions
@ 2015-04-08 21:47 Harald Koenig
  2015-04-09 12:52 ` Wolfgang Schuster
  2015-04-09 18:28 ` Pablo Rodriguez
  0 siblings, 2 replies; 6+ messages in thread
From: Harald Koenig @ 2015-04-08 21:47 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Harald Koenig

Hi,

I'd like to type set a single hindi/devanagari word in a chapter heading (using standalone MkVI),
where I need your help for some questions/problems:

- which (free) font do you suggest ?  right now I'm using "Lohit-Devanagari". 
  text font is 11pt Palatino, Lohit doesn't match too good, and a bold version
  would be nice for the chapter head.

- font size: how do I define this font to get automatic/matching font sizes
  for both the chapter head and the title of contents ?

right now I use

      \definefont [hindib] [Lohit-Devanagari at 24pt]
      ...
      \mychapter{Danke -- {\hindib  धन्यवाद}}

which gives a reaosonable font size for the chapter title,
but of course that's way too large for the TOC:-(


what's the right way to define a "scalable" single font (or two, if you have a suggestion
for a normal+bold devanagari font) in ConTeXt ?
  

thanks,

Harald
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
                                                       \/\/\/\/\/\/\/\/\/
Harald Koenig                                           //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: (hindi) font questions
  2015-04-08 21:47 (hindi) font questions Harald Koenig
@ 2015-04-09 12:52 ` Wolfgang Schuster
  2015-04-10  6:43   ` Harald Koenig
  2015-04-09 18:28 ` Pablo Rodriguez
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2015-04-09 12:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]


> Am 08.04.2015 um 23:47 schrieb Harald Koenig <koenig@tat.physik.uni-tuebingen.de>:
> 
> Hi,
> 
> I'd like to type set a single hindi/devanagari word in a chapter heading (using standalone MkVI),
> where I need your help for some questions/problems:
> 
> - which (free) font do you suggest ?  right now I'm using "Lohit-Devanagari". 
>  text font is 11pt Palatino, Lohit doesn't match too good, and a bold version
>  would be nice for the chapter head.
> 
> - font size: how do I define this font to get automatic/matching font sizes
>  for both the chapter head and the title of contents ?
> 
> right now I use
> 
>      \definefont [hindib] [Lohit-Devanagari at 24pt]
>      ...
>      \mychapter{Danke -- {\hindib  धन्यवाद}}
> 
> which gives a reaosonable font size for the chapter title,
> but of course that's way too large for the TOC:-(
> 
> 
> what's the right way to define a "scalable" single font (or two, if you have a suggestion
> for a normal+bold devanagari font) in ConTeXt ?


You can use the fallback mechanism to use a different font for characters which aren’t available in the main font.

\definefallbackfamily [mainface] [rm] [Devanagari MT] [range=devanagari,scale=1.2]
\definefontfamily     [mainface] [rm] [TeX Gyre Pagella]

\definefontfamily     [mainface] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[mainface]

\starttext
Danke – धन्यवाद
\stoptext

Wolfgang

[-- Attachment #2: test.pdf --]
[-- Type: application/pdf, Size: 12005 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: (hindi) font questions
  2015-04-08 21:47 (hindi) font questions Harald Koenig
  2015-04-09 12:52 ` Wolfgang Schuster
@ 2015-04-09 18:28 ` Pablo Rodriguez
  1 sibling, 0 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2015-04-09 18:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/08/2015 11:47 PM, Harald Koenig wrote:
> Hi,
> 
> I'd like to type set a single hindi/devanagari word in a chapter
> heading (using standalone MkVI), where I need your help for some
> questions/problems:
>
> - which (free) font do you suggest ? right now I'm using "Lohit-Devanagari".
>   text font is 11pt Palatino, Lohit doesn't match too good, and a bold
>   version would be nice for the chapter head.

Hi Harald,

as an alternative to the font proposed by Wolfgang (seems to be only
available for Mac), FreeSerif may be an option
(https://ftp.gnu.org/gnu/freefont/).

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: (hindi) font questions
  2015-04-09 12:52 ` Wolfgang Schuster
@ 2015-04-10  6:43   ` Harald Koenig
  2015-04-10  8:59     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Koenig @ 2015-04-10  6:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

On Apr 09, Wolfgang Schuster wrote:

> You can use the fallback mechanism to use a different font for characters which aren’t available in the main font.
> 
> \definefallbackfamily [mainface] [rm] [Devanagari MT] [range=devanagari,scale=1.2]
> \definefontfamily     [mainface] [rm] [TeX Gyre Pagella]
> 
> \definefontfamily     [mainface] [mm] [TeX Gyre Pagella Math]
> 
> \setupbodyfont[mainface]
> 
> \starttext
> Danke – धन्यवाद
> \stoptext

doesn't work for me -- the indien glyphs don't show up:-(

I'll attch my test, log and my current font...


Harald
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
                                                       \/\/\/\/\/\/\/\/\/
Harald Koenig                                           //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

[-- Attachment #2: test.tex --]
[-- Type: application/x-tex, Size: 297 bytes --]

[-- Attachment #3: test.log --]
[-- Type: text/plain, Size: 5456 bytes --]

open source     > 1 > 1 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2015.03.09 22:02 MKIV beta  fmt: 2015.3.10  int: english/english

system          > 'cont-new.mkiv' loaded
open source     > 2 > 2 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv
close source    > 2 > 2 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > files > jobname 'test', input './test', result 'test'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > 2 > 3 > /home/harald/tex/Indien-2015/test.tex
fonts           > preloading modern-designsize (mono)
fonts           > typescripts > unknown library 'modern-designsize' or 'modern'
fonts           > 'fallback modern-designsize tt 12pt' is loaded
backend         > xmp > using file '/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1
close source    > 2 > 3 > /home/harald/tex/Indien-2015/test.tex
close source    > 1 > 3 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv

system          > structure > start used structure

used structure  > text: test

system          > structure > stop used structure


system          > files > start used files

used file       >    1: filename=cont-yes.mkiv filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv usedmethod=database
used file       >    2: filename=publ-imp-default.lua filetype=scripts foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/publ-imp-default.lua usedmethod=database
used file       >    3: filename=cont-new.mkiv filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv usedmethod=database
used file       >    4: filename=lang-us.lua filetype=scripts foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/patterns/lang-us.lua usedmethod=database
used file       >    5: filename=/home/harald/tex/Indien-2015/test foundname=/home/harald/tex/Indien-2015/test.tex usedmethod=qualified
used file       >    6: filename=texgyre.lfg filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/fonts/texgyre.lfg usedmethod=database
used file       >    7: filename=texgyrepagella-regular.otf filetype=otf format=otf foundname=/home/harald/tex/Indien-2015/ct/tex/texmf/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf usedmethod=database
used file       >    8: filename=texgyrepagella-math.otf filetype=otf format=otf foundname=/home/harald/tex/Indien-2015/ct/tex/texmf/fonts/opentype/public/tex-gyre-math/texgyrepagella-math.otf usedmethod=database
used file       >    9: filename=lpdf-pdx.xml filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/lpdf-pdx.xml usedmethod=database

system          > files > stop used files


system          > options > start commandline options

used option     > currentrun="1"
used option     > fulljobname="./test"
used option     > input="./test"
used option     > kindofrun="1"
used option     > maxnofruns="8"
used option     > no-parse-first-line="true"

system          > options > stop commandline options

system          > options > start commandline files

used file       >    1: ./test

system          > options > stop commandline files


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: /home/harald/tex/Indien-2015/ct/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.017 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 9 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 366 modules (0.261 sec), 76 tables (0.008 sec), 442 chunks (0.269 sec)
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 44 nodes, 439 lists of 438
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 9 attribute, 29 glue_spec, 3 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 5 instances (re)created, 39 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: 147 direct, 244 indirect, 391 total
mkiv lua stats  > randomizer: resumed with value 0.68047591842733
mkiv lua stats  > result saved in file: test.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats  > loaded fonts: 2 files: texgyrepagella-math.otf, texgyrepagella-regular.otf
mkiv lua stats  > fonts load time: 0.236 seconds 
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: texmf-linux-64
mkiv lua stats  > luatex banner: this is luatex, version beta-0.79.3 (tex live 2015/dev) (rev 5140)
mkiv lua stats  > control sequences: 39771 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua, used memory: 54 MB (ctx: 55 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.598 seconds, 1 processed pages, 1 shipped pages, 1.672 pages/second


[-- Attachment #4: Lohit-Devanagari.ttf --]
[-- Type: application/x-font-ttf, Size: 64232 bytes --]

[-- Attachment #5: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: (hindi) font questions
  2015-04-10  6:43   ` Harald Koenig
@ 2015-04-10  8:59     ` Wolfgang Schuster
  2015-04-13 19:20       ` Harald Koenig
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2015-04-10  8:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 10.04.2015 um 08:43 schrieb Harald Koenig <koenig@tat.physik.uni-tuebingen.de>:
> 
> On Apr 09, Wolfgang Schuster wrote:
> 
>> You can use the fallback mechanism to use a different font for characters which aren’t available in the main font.
>> 
>> \definefallbackfamily [mainface] [rm] [Devanagari MT] [range=devanagari,scale=1.2]
>> \definefontfamily     [mainface] [rm] [TeX Gyre Pagella]
>> 
>> \definefontfamily     [mainface] [mm] [TeX Gyre Pagella Math]
>> 
>> \setupbodyfont[mainface]
>> 
>> \starttext
>> Danke – धन्यवाद
>> \stoptext
> 
> doesn't work for me -- the indien glyphs don't show up:-(


You forgot the “range” setting for the fallback font which tells context which glyphs should be taken from the font.

\definefallbackfamily [mainface] [rm] [Lohit Devanagari] [range=devanagari,scale=1.2]
\definefontfamily     [mainface] [rm] [TeX Gyre Pagella]
\definefontfamily     [mainface] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[mainface]

\starttext
Danke – धन्यवाद
\stoptext

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: (hindi) font questions
  2015-04-10  8:59     ` Wolfgang Schuster
@ 2015-04-13 19:20       ` Harald Koenig
  0 siblings, 0 replies; 6+ messages in thread
From: Harald Koenig @ 2015-04-13 19:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Apr 10, Wolfgang Schuster wrote:

> You forgot the “range” setting for the fallback font which tells context which glyphs should be taken from the font.

opps sorry!  
I only removed the "range" after my first attempt didn't succeed...

now it's working fine, but only after copying the font to "tex/texmf-local/fonts/truetype/"
and running "context --generate".  
thanks!!!


for my first naiive approach with \definefont it was ok/sufficient
to keep the TTF file in the local project's directory.

why is not true for your \definefallbackfamily solution ?


thanks again!!

Harald
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
                                                       \/\/\/\/\/\/\/\/\/
Harald Koenig                                           //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^
___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2015-04-13 19:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 21:47 (hindi) font questions Harald Koenig
2015-04-09 12:52 ` Wolfgang Schuster
2015-04-10  6:43   ` Harald Koenig
2015-04-10  8:59     ` Wolfgang Schuster
2015-04-13 19:20       ` Harald Koenig
2015-04-09 18:28 ` Pablo Rodriguez

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