ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Yue Wang <yuleopen@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Why searching fonts in xetex is so slow?
Date: Sat, 25 Apr 2009 09:44:59 +0800	[thread overview]
Message-ID: <68bfdc900904241844h6d20e72bif1e9767b991612e1@mail.gmail.com> (raw)
In-Reply-To: <6faad9f00904241327i5d915157ue6e5b02805e01c3c@mail.gmail.com>

Hi, Mojca:


you are absolutely right!

When load iwona with the following two typeface, the loading time
takes up 7-8 seconds.
TeXExec | runtime: 8.296

\definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec]
\definetypeface [iwona] [mm] [math] [iwona] [default] [encoding=ec]
\setupbodyfont[iwona,ss,12pt]
\starttext
\input zapf

$$\int_a^b f(x) d x = 0$$
\stoptext

However, when comment the second line (\definetypeface [iwona] [mm]
[math] [iwona] [default] [encoding=ec]),
TeXExec | runtime: 1.828
total compile time is reduced to only 2 seconds. (of course, equations
are typeset in latin modern).

How can I speed up math font loading? change add file: suffix (like
[file:rm-iwonar])  won't help :(

Yue Wang


On Sat, Apr 25, 2009 at 4:27 AM, Mojca Miklavec
<mojca.miklavec.lists@gmail.com> wrote:
> On Fri, Apr 24, 2009 at 13:33, Yue Wang wrote:
>> Hi, Hans
>>
>> Now I know why XeTeX uses 1-2 minutes to compile a simple document:
>> Each time first-setup.bat runs, it erase the user fontforge cache.
>> So if I compile a document right after updating ConTeXt minimals,
>> XeTeX will automatically run fc-cache to generate the font cache.
>>
>> Today I test a little bit, the time used for fc-cache -r is
>> approximately the xetex's first running time.
>
> True, XeTeX runs fc-cache every now and then, but I didn't manage to
> figure out when that happens. I would suggest to ask about that on the
> XeTeX mailing list. ConTeXt has zero influence on that behaviour,
> except that it could avoid searching via fc.
>
>> Next compilation uses about 7-8 seconds, which is reasonable (it first
>> searches the fc cache, then the texmf tree)
>> btw, can we change the type-otf.tex to force mkii to search fonts like
>> iwona and tex gyre in the texmf tree first?
>
> Iwona? There are lines like
>    \definefontsynonym [Iwona-Regular] [file:Iwona-Regular] [features=default]
> which means that it first searches on texmf tree, but I suspect that
> math fonts are being searched via fontconfig first. The way font
> searching is implemented now ([rm-iwonar] will look for
> \font\something="rm-iwonar" instead of \font\something=rm-iwona =>
> this means searching via fontconfig first; the font is not found
> there, so it searches in texmf tree further) it is not possible to
> convince ConTeXt to search in texmf tree first unless Hans changes
> core macros (the part that has been broken for almost a year).
>
> Mojca
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________


  parent reply	other threads:[~2009-04-25  1:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04  5:24 Yue Wang
2009-03-04  8:04 ` Hans Hagen
2009-03-09  2:14   ` Yue Wang
2009-03-09  8:28     ` Hans Hagen
2009-04-24 11:33       ` Yue Wang
2009-04-24 20:27         ` Mojca Miklavec
2009-04-24 20:57           ` Hans Hagen
2009-04-24 21:17             ` Mojca Miklavec
2009-04-25  1:44           ` Yue Wang [this message]
2009-04-25  9:39             ` Mojca Miklavec
2009-04-25 11:18               ` Yue Wang
2009-04-25 11:49                 ` Mojca Miklavec
2009-04-25 12:43                 ` Hans Hagen
2009-04-25 13:33                   ` Yue Wang
2009-04-25 13:41                     ` Hans Hagen
2009-04-25 14:07                       ` Yue Wang
2009-04-25 14:09                         ` Mojca Miklavec
2009-04-25 14:13                           ` Mojca Miklavec
2009-04-25 14:13                           ` Yue Wang
2009-04-25 16:18                           ` Hans Hagen
2009-04-25 14:15                         ` Mojca Miklavec
2009-04-25 14:31                           ` Yue Wang
2009-04-25 16:19                             ` Hans Hagen
2009-04-25 18:06                               ` Mojca Miklavec
2009-04-25 18:17                                 ` Hans Hagen
2009-04-25 16:18                           ` Hans Hagen
2009-04-25 16:17                         ` Hans Hagen
2009-04-25 14:08                     ` Mojca Miklavec
2009-04-25 16:15                       ` Hans Hagen
2009-04-25 14:41                   ` Yue Wang
2009-04-25 16:21                     ` Hans Hagen
2009-04-25 12:14               ` Taco Hoekwater
2009-04-25 13:27               ` Hans Hagen
2009-04-24 20:29         ` Mojca Miklavec
2009-04-25  1:08           ` Yue Wang
2009-04-25 11:45             ` Mojca Miklavec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68bfdc900904241844h6d20e72bif1e9767b991612e1@mail.gmail.com \
    --to=yuleopen@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).