Skip to content

Commit 5f983bb

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

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

fedora/font-manager.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
Name: font-manager
1717
Version: %{MajorVersion}.%{MinorVersion}.%{PatchVersion}.%{build_timestamp}
18-
Release: 4
18+
Release: 5
1919
Summary: A simple font management application for Gtk+ Desktop Environments
2020
License: GPLv3+
2121
Url: http://fontmanager.github.io/
@@ -198,5 +198,5 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.metain
198198
%endif
199199

200200
%changelog
201-
* Wed Mar 5 2025 JerryCasiano <JerryCasiano@gmail.com> 0.9.4-4
201+
* Fri Aug 1 2025 JerryCasiano <JerryCasiano@gmail.com> 0.9.4-5
202202
- Refer to https://github.com/FontManager/font-manager/commits/master for changes.

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)