diff options
author | Phil Jones <philj56@gmail.com> | 2021-11-03 01:22:20 +0000 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2021-11-03 01:22:20 +0000 |
commit | fb0e358feccc45c7cd642e346d07f4f7f21b484b (patch) | |
tree | ecac26391504b5b9e1e24978877fc446cd6e7c27 /src/main.c | |
parent | c7eaec357376533a77195d355cc4711d46177121 (diff) |
Don't use Pango by default.
Initialising Pango makes up a large portion of the startup time, and we
can achieve neater rendering with pure Cairo if we're just drawing
circles anyway. Therefore, this commit avoids loading Pango if no
options which require it are specified (such as --font-name or
--password-character). This reduces startup time with no background
image to ~40ms on my machine (2015 MacBook Pro).
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -701,6 +701,7 @@ int main(int argc, char *argv[]) break; case 'f': state.window.entry.font_name = optarg; + state.window.entry.use_pango = true; break; case 'F': state.window.entry.font_size = @@ -712,6 +713,7 @@ int main(int argc, char *argv[]) optarg, 4, NULL); + state.window.entry.use_pango = true; break; case 'c': state.command = optarg; @@ -725,6 +727,7 @@ int main(int argc, char *argv[]) break; case 'w': state.window.entry.tight_layout = false; + state.window.entry.use_pango = true; break; case 'H': state.hide_cursor = true; |