[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pixel-based display functions
From: |
Lars Ingebrigtsen |
Subject: |
Re: Pixel-based display functions |
Date: |
Fri, 30 Jan 2015 18:27:23 +1100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: Lars Ingebrigtsen <address@hidden>
>> Date: Fri, 30 Jan 2015 17:37:00 +1100
>>
>> `font-get-glyphs' on a large region is quite fast, but since the font
>> may vary, I'm calling it on a char-by-char basis, and that's s-l-o-w.
>
> That's your problem: you should call it on a run of characters that
> have the same face. Use next-single-char-property-change to find
> where such runs begin and end.
The face doesn't say what font is going to be used. If I put 日本語
here, the entire preceding line has the same face, but two different
fonts.
I've done further experimentation, and it turns out my previous analysis
was kinda wrong. `font-get-glyphs' isn't really the problem --
`font-at' is. Calling it once per character is just way too slow.
If you have a handy function that can segment lines according to font
(even though it can't say what the font is (yet)), that would be useful.
If I could (on the first line there) just call `font-at' twice, I think
that would allow me to write an algorithm that should be fast enough.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
- Re: Pixel-based display functions, (continued)
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/28
- Re: Pixel-based display functions, Stefan Monnier, 2015/01/28
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/28
- Re: Pixel-based display functions, Stefan Monnier, 2015/01/28
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/28
- Re: Pixel-based display functions, Stefan Monnier, 2015/01/28
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/29
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/29
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions,
Lars Ingebrigtsen <=
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Andreas Schwab, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Stefan Monnier, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Stefan Monnier, 2015/01/31
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/31