Skip to content

Commit 5f87f37

Browse files
committed
- Avoid localized values for font version field in properties page - Closes #454
1 parent f79d059 commit 5f87f37

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/common/font-manager-database.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "font-manager-string-set.h"
4141
#include "font-manager-utils.h"
4242

43-
#define FONT_MANAGER_CURRENT_DATABASE_VERSION 4
43+
#define FONT_MANAGER_CURRENT_DATABASE_VERSION 5
4444

4545
#define FONT_MANAGER_TYPE_DATABASE font_manager_database_get_type()
4646
G_DECLARE_FINAL_TYPE(FontManagerDatabase, font_manager_database, FONT_MANAGER, DATABASE, GObject)

lib/common/font-manager-freetype.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,11 @@ get_font_revision (JsonObject *json_obj, const FT_Face face)
757757
TT_Header *head = (TT_Header *) FT_Get_Sfnt_Table(face, FT_SFNT_HEAD);
758758
if (head) {
759759
if (head->Font_Revision) {
760+
g_autofree gchar *loc = g_strdup(setlocale(LC_ALL, NULL));
761+
setlocale(LC_ALL, "C");
760762
g_autofree gchar *rev = g_strdup_printf("%.2f", (float) head->Font_Revision / 65536.0);
761763
json_object_set_string_member(json_obj, "version", rev);
764+
setlocale(LC_ALL, loc);
762765
return;
763766
}
764767
}

0 commit comments

Comments
 (0)