[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font substitution
From: |
Yen-Ju Chen |
Subject: |
Re: font substitution |
Date: |
Fri, 10 Aug 2007 14:18:50 -0700 |
Hi,
[NSFont coveredCharacterSet] is broken.
I attach a patch.
A quick test shows that a Chinese font which contains 25,000+ glyph
takes only about 1-2 seconds to go through.
It's on a powerbook G4 1GHz.
So cache may not be needed for coveredCharacterSet.
I haven't test the preferredFont yet.
Hope this patch can go in soon.
Yen-Ju
On 8/9/07, Yen-Ju Chen <yjchenx@gmail.com> wrote:
> On 8/9/07, Fred Kiefer <fredkiefer@gmx.de> wrote:
> > Yen-Ju Chen wrote:
> > > On 8/8/07, Fred Kiefer <fredkiefer@gmx.de> wrote:
> > >> Yen-Ju Chen wrote:
> > >>> Another thing I am thinking is to save the coveredCharacterSet on
> > >>> disk.
> > >>> Font does not change frequently,
> > >>> and it does take time to generate coveredCharacterSet for each font,
> > >>> especially for CJK.
> > >>> If the cached coveredCharacterSet can be saved on disk and loaded
> > >>> later,
> > >>> it can reduce the overhead of starting an application.
> > >>> For art backend, it can even pack the saved coveredCharacterSet in
> > >>> nfont.
> > >>> So for small font, it is fine to check the covered character each
> > >>> time.
> > >>> For big font, saved character set is better.
> > >>>
> > >> Great idea! Would you like to work on that?
> > >
> > > If the patch you have goes into the -trunk,
> > > I can play with it and see how much it effects the speed
> > > and decide what's the best way to do the cache if needed.
> > >
> >
> > I just committed this change, now it is your turn :-)
>
> Thanx. I will take a look shortly.
>
> Yen-Ju
>
> >
>
ftfont_patch.diff
Description: Text Data
- Re: font substitution, (continued)
- Re: font substitution, Yen-Ju Chen, 2007/08/05
- Re: font substitution, Fred Kiefer, 2007/08/07
- Re: font substitution, Yen-Ju Chen, 2007/08/07
- Re: font substitution, Yen-Ju Chen, 2007/08/07
- Re: font substitution, Fred Kiefer, 2007/08/07
- Re: font substitution, Yen-Ju Chen, 2007/08/07
- Re: font substitution, Fred Kiefer, 2007/08/08
- Re: font substitution, Yen-Ju Chen, 2007/08/08
- Re: font substitution, Fred Kiefer, 2007/08/09
- Re: font substitution, Yen-Ju Chen, 2007/08/09
- Re: font substitution,
Yen-Ju Chen <=
- Re: font substitution, Yen-Ju Chen, 2007/08/10
- Re: font substitution, Yen-Ju Chen, 2007/08/10
- Re: font substitution, Fred Kiefer, 2007/08/11
- Re: font substitution, Yen-Ju Chen, 2007/08/11
- Re: font substitution, Fred Kiefer, 2007/08/12
- Re: font substitution, Yen-Ju Chen, 2007/08/12
- Re: font substitution, Yen-Ju Chen, 2007/08/12
- Re: font substitution, Fred Kiefer, 2007/08/12
- Re: font substitution, Yen-Ju Chen, 2007/08/12
- Re: font substitution, Fred Kiefer, 2007/08/12