diff options
author | Eon S. Jeon <esjeon@lavabit.com> | 2013-07-19 01:07:02 -0400 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2013-07-19 08:38:10 +0200 |
commit | 33ad83d49213749f4fcec850327f57a33ca8b921 (patch) | |
tree | 264341fa0a2e832b95af7d92753e30c1faf894da /st.info | |
parent | 40e4d76d227d9c517054036f546acd49431bca42 (diff) | |
download | st-33ad83d49213749f4fcec850327f57a33ca8b921.tar.gz |
Improved font caching
I made a patch that improves the performance of font caching mechanism.
This is based on a funny behaviour of FontConfig: it was handling
FcCharSet in a somewhat unexpected way.
So, we are currently adding "a character" to a new FcCharSet, and then
add it to a FcPattern. However, if we toss the FcPattern to FontConfig,
it loads the entire language(charset) that contains the character we
gave. That is, we don't always have to load a new font for each unknown
character. Instead, we can reused cached fonts, and this significantly
reduces the number of calls to extremely slow FontConfig matching
functions.
One more thing. I found that, in libXft, there's a function called
XftCharExists. XftCharIndex internally calls this function, and
does more stuffs if the character does exist. Since the returned index
is never used in st, we should call XftCharExists instead of
XftCharIndex. Please note that I already made this change in the patch.
Diffstat (limited to 'st.info')
0 files changed, 0 insertions, 0 deletions