ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* font name has a space.
@ 2011-03-06 12:52 Jeong Dalyoung
  2011-03-06 15:45 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Jeong Dalyoung @ 2011-03-06 12:52 UTC (permalink / raw)
  To: ntg-context

Dear all,

I tried define a font whose name contains a space, but not succeed.

font name: smMokPan Medium
font file name: smMokPan Medium.otf

I tired as follows, but ConTeXt couldn't locate the font file.

\definefont[testfont][name:"smMokPan Medium"] 
\definefont[testfont][name:(smMokPan\space Medium)]
\definefont[testfont][name:smMokPan\space Medium]
	in log file 
		fonts           > latin modern fonts are not preloaded
		languages       > language en is active
		fonts           > beware: no fonts are loaded yet, using 'lm mono' in box



\definefont[testfont][file:smMokPan Medium.otf]
\definefont[testfont][file:smMokPan\space Medium.otf]

fonts           > virtual math > the mapping is incomplete for 'txmath' at 5pt
system          > begin file testmp.tex at line 25
fonts           > defining > font with asked name 'smMokPan' is not found using lookup 'file'
fonts           > defining > unknown font smMokPan, loading aborted
fonts           > defining > unable to define smMokPan as \**testfont**

How to defint a font whose name contains a space?

Thank you.

best regards,

Dalyoung
___________________________________________________________________________________
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] 7+ messages in thread

* Re: font name has a space.
  2011-03-06 12:52 font name has a space Jeong Dalyoung
@ 2011-03-06 15:45 ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2011-03-06 15:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jeong Dalyoung

On 6-3-2011 1:52, Jeong Dalyoung wrote:
> Dear all,
>
> I tried define a font whose name contains a space, but not succeed.
>
> font name: smMokPan Medium
> font file name: smMokPan Medium.otf
>
> I tired as follows, but ConTeXt couldn't locate the font file.
>
> \definefont[testfont][name:"smMokPan Medium"]

just remove the spaces

smmokpanmedium

-----------------------------------------------------------------
                                           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
___________________________________________________________________________________


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

* Re: font name has a space.
@ 2011-03-07 23:42 Jeong Dalyoung
  0 siblings, 0 replies; 7+ messages in thread
From: Jeong Dalyoung @ 2011-03-07 23:42 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 3694 bytes --]

Dear Wolfgang,

Yes, as you said, it is working.

The current result of mtxrun is as following:

Math-iMac:~ graph$ mtxrun --script font --list --all --pattern=georgia*

georgia             georgia             /Library/Fonts/Georgia.ttf
georgiabold         georgiabold         /Library/Fonts/Georgia Bold.ttf
georgiabolditalic   georgiabolditalic   /Library/Fonts/Georgia Bold Italic.ttf
georgiaitalic       georgiaitalic       /Library/Fonts/Georgia Italic.ttf
georgianormal       georgiaitalic       /Library/Fonts/Georgia Italic.ttf

I tested another english fonts whose name containing space by removing the space in the name when I call it.
English fonts are working well.

But the same file with the korean font is not working.
As in the following log file, it loaded the fonts, but issue an error message.

###############
ConTeXt  ver: 2011.02.25 22:03 MKIV  fmt: 2011.3.1  int: english/english

system          > cont-new.mkiv loaded
(/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > testmp.top loaded
(testmp.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
fonts           > beware: no fonts are loaded yet, using 'lm mono' in box
(/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/page-run.mkiv
loading         > ConTeXt Page Macros / Runtime Macros
){/Users/graph/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
(/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/type-siz.mkiv) (/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/type-otf.mkiv){/Users/graph/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/graph/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > fallback modern rm 12pt is loaded
system          > begin file testmp.tex at line 29
fonts           > otf loading > loading: /Users/graph/Library/Fonts/smHeadT Medium.otf (hash: smheadt-medium)
fonts           > otf loading > font loaded okay
fonts           > otf loading > loading method: table
fonts           > otf loading > file size: 1968816
fonts           > otf loading > start enhancing: /Users/graph/Library/Fonts/smHeadT Medium.otf
fonts           > otf loading > warning: non unicode map '', only using glyph unicode data
fonts           > encoding > loading (extended) adobe glyph list
fonts           > otf loading > stop enhancing
fonts           > otf loading > saving in cache: /Users/graph/Library/Fonts/smHeadT Medium.otf
system          > logs > lua: compiling /Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otf/smheadt-medium.tma into /Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otf/smheadt-medium.tmc
fonts           > otf loading > preprocessing and caching took 0.578 seconds
structure       > sectioning > chapter @ level 2 : 0.1 -> X
structure       > sectioning > section @ level 3 : 0.1.1 -> One
backend         > xmp > using file '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
pages           > flushing realpage 2, userpage 2
system          > end file testmp.tex at line 36
 )</Users/graph/Library/Fonts/smHeadT Medium.otf
!LuaTeX error (file /Users/graph/Library/Fonts/smHeadT Medium.otf): Invalid character.
 ==> Fatal error occurred, no output PDF file produced!
###############

I think that it is the only problem in Korean fonts whose name contaings a space.

Thank you for your concern.

Best regards,

Dalyoung

[-- Attachment #1.2: Type: text/html, Size: 5966 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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] 7+ messages in thread

* Re: font name has a space.
  2011-03-07 12:03 Jeong Dalyoung
@ 2011-03-07 17:10 ` Wolfgang Schuster
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2011-03-07 17:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 07.03.2011 um 13:03 schrieb Jeong Dalyoung:

> I tested english font which has a space in its name and got the same results. For example, "Geogia Bold.ttf" font.
> luatools cannot locate it and LuaTeX said "unknown font." and used default font.
> 
> I renamed it GeogiaBold.ttf in /Library/fonts and tried again, but not succeed.

Do you have another version of Georgia in your tex directory, e.g. I had the core fonts from microsoft under texmf-fonts and context used them instead of the system version. I deleted now the font from the tex directory and context use now the system font.

You can check if context can font the font with

  mtxrun --script font --list --all --pattern=georgia*

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] 7+ messages in thread

* Re: font name has a space.
@ 2011-03-07 12:03 Jeong Dalyoung
  2011-03-07 17:10 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Jeong Dalyoung @ 2011-03-07 12:03 UTC (permalink / raw)
  To: ntg-context

Dear Taco,

Thank you for your comment.

I renamed the font to ~.ttf, luatools --generate first.

And try the same file. 
At this time, there is no "Fatal error messages", but still it doesn't locate the font file.

So, I tested a few more things.

Test 1:
luatools locates all the fonts which has no space from the same font maker. And, LuaTeX runs well to yield fine output.

Math-iMac:~ graph$ luatools 산돌돌CB.otf
	/Users/graph/Library/Fonts/산돌돌CB.otf

Math-iMac:~ graph$ luatools 산돌명조B.otf
	/Users/graph/Library/Fonts/산돌명조B.otf
#######

Test 2:
luatools cannot locate the fonts which has space from the same font maker.

Math-iMac:~ graph$ luatools 산돌명조M.otf

Math-iMac:~ graph$ luatools 산돌명조 M.otf

Math-iMac:~ graph$ luatools 산돌명조\space M.otf

But it locates the same file if I enclose "font name".
Math-iMac:~ graph$ luatools "산돌명조 M.otf"
/Users/graph/Library/Fonts/산돌명조 M.otf

So I tired  \definefont[testfont][file:"산돌명조 M.otf"], but LuaTeX issue an error

system          > begin file testmp.tex at line 29
! LuaTeX error <main ctx instance>:1: ')' expected near '?'.

system          > tex > error on line 30 in file testmp.tex: LuaTeX error  ...


25     
26     \definefont[testfont][file:"산돌명조 M.otf"]
27     
28     
29     \starttext
30 >>  \testfont
31     \chapter{X}
32     \section{One}
33     \dorecurse{10}{test fone file. }
34     \dorecurse{10}{산 돌 명조 폰트 file입니다. }
35     
36     \stoptext


\lowleveldefinefont ...ies ", "\@@fontgoodies " )}
                                                  \edef \somefontspec {at \n...
\dododefinefont ...inefont {#2}\rawfontidentifier 
                                                  \csname \rawfontidentifier...
l.30 \testfont
              
? 

I tested english font which has a space in its name and got the same results. For example, "Geogia Bold.ttf" font.
luatools cannot locate it and LuaTeX said "unknown font." and used default font.

I renamed it GeogiaBold.ttf in /Library/fonts and tried again, but not succeed.

Hence, I think that the font whose name contains no space has no problem.
The fonts whose name contains a space make a trouble eventhough I removed the space from it.

Am I doing right? 

I am using Mac OSX. And, 

This is LuaTeX, Version beta-0.65.0-2010121316 
 \write18 enabled.
(testmp.tex

ConTeXt  ver: 2011.02.25 22:03 MKIV  fmt: 2011.3.1  int: english/english

Thank you again.

Best regards,

Dalyoung



___________________________________________________________________________________
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] 7+ messages in thread

* Re: font name has a space.
  2011-03-06 23:58 Jeong Dalyoung
@ 2011-03-07  7:21 ` Taco Hoekwater
  0 siblings, 0 replies; 7+ messages in thread
From: Taco Hoekwater @ 2011-03-07  7:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jeong Dalyoung

On 03/07/2011 12:58 AM, Jeong Dalyoung wrote:
> Dear Hans,
>
> After removing space in the name, LuaTeX locates the font.
> However, I couldn't get an output.
>
> There is a fatal error message as following:
>
>   )</Users/graph/Library/Fonts/smMokPan Medium.otf
> !LuaTeX error (file /Users/graph/Library/Fonts/smMokPan Medium.otf): Invalid character.
>   ==>  Fatal error occurred, no output PDF file produced!
>
> There may be some problems in the font file.

Sounds like the backend font type discovery is wrong. If the font is
using truetype outlines (likely), then renaming it to .ttf will fix 
this. Please try that to see what happens. If that fixes it, then the
next luatex beta release will remove the necessity to rename the font.

Otherwise (if it really is a postscript/cff font), you will have to
wait for a next beta by Hans that will hopefully fix it.

> But, it was working well in other editing programs.
> I'd like to tell to font maker about this error. On the while,

It is almost certainly not an actual font error.

> Is there a way to get a detailed information on the "Invalid character" error ?

No. This is a low-level error in the font inclusion code, at this point
there is no better error discovery than this.

Best wishes,
Taco
___________________________________________________________________________________
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] 7+ messages in thread

* Re: font name has a space.
@ 2011-03-06 23:58 Jeong Dalyoung
  2011-03-07  7:21 ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Jeong Dalyoung @ 2011-03-06 23:58 UTC (permalink / raw)
  To: ntg-context

Dear Hans,

After removing space in the name, LuaTeX locates the font.
However, I couldn't get an output.

There is a fatal error message as following: 

 )</Users/graph/Library/Fonts/smMokPan Medium.otf
!LuaTeX error (file /Users/graph/Library/Fonts/smMokPan Medium.otf): Invalid character.
 ==> Fatal error occurred, no output PDF file produced!

There may be some problems in the font file. But, it was working well in other editing programs.
I'd like to tell to font maker about this error. On the while, Is there a way to get a detailed information on the "Invalid character" error ?

Thank you for your help.

Best regards,

Dalyoung
___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2011-03-07 23:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-06 12:52 font name has a space Jeong Dalyoung
2011-03-06 15:45 ` Hans Hagen
2011-03-06 23:58 Jeong Dalyoung
2011-03-07  7:21 ` Taco Hoekwater
2011-03-07 12:03 Jeong Dalyoung
2011-03-07 17:10 ` Wolfgang Schuster
2011-03-07 23:42 Jeong Dalyoung

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