main: call setlocale() *after* loading fonts

This ensures the fonts are instantiated while LC_NUMERICAL is "C",
which required to handle FontConfig strings like "size=12.5".
This commit is contained in:
Daniel Eklöf 2020-04-29 18:58:43 +02:00
parent 0678015eb1
commit 44fb0b83ba
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

4
main.c
View file

@ -176,8 +176,6 @@ print_pid(const char *pid_file, bool *unlink_at_exit)
int int
main(int argc, char *const *argv) main(int argc, char *const *argv)
{ {
setlocale(LC_ALL, "");
static const struct option longopts[] = { static const struct option longopts[] = {
{"backend", required_argument, 0, 'b'}, {"backend", required_argument, 0, 'b'},
{"config", required_argument, 0, 'c'}, {"config", required_argument, 0, 'c'},
@ -321,6 +319,8 @@ main(int argc, char *const *argv)
return 0; return 0;
} }
setlocale(LC_ALL, "");
bar->abort_fd = abort_fd; bar->abort_fd = abort_fd;
thrd_t bar_thread; thrd_t bar_thread;