Opened 7 years ago

Closed 6 years ago

#56 closed defect (fixed)

fonts from ~/.grafx2/fonts/ not accessible

Reported by: nitrofurano@… Owned by: pulkomandy
Priority: critical Milestone: 2.5
Component: GrafX2 Version: 2.3
Keywords: Cc:


there is a bug about fonts from ~/.grafx2/fonts/ not being accessible, which seems nonsense, since from /usr/share/grafx2/fonts/ are

and meanwhile, some few from /usr/share/fonts/*/*/* are accessible, and i wanted none from them accessible at all - so i guess we can change it on the settings? where and how?

(btw, disastrously because this quite annoying fonts issue from /usr/share/fonts/*/*/*, i did a "sudo rm -r /usr/share/fonts/*/*/*", so i guess you can imagine the result in the whole operating system... :S )

Change History (8)

comment:1 by PulkoMandy, 7 years ago

The system fonts in /usr/share/fonts are used for True Type ones. In GrafX2 specific directories, you can put additional bitmap fonts, which are not in a format the usual Linux systems can understand and use.

There is no way to disable access to the system fonts. Why would we? What was your problem with them?

comment:2 by Thomas Bernard, 6 years ago

you should put your personal fonts in ~/.fonts
I don't think that's needed to add support for a specific ~/.grafx2/fonts directory

comment:3 by PulkoMandy, 6 years ago

It makes sense to have a ~/.config/grafx2/fonts mirroring /usr/share/grafx2/fonts/ (in general .config/grafx2 and share/grafx2 should have the same organization). It should be used only for bitmap fonts (not ttf, which should be shared with the system) - but I see no reason for preventing the user from putting ttf files there.

comment:4 by Thomas Bernard, 6 years ago

OK so in text.c/Init_text() we can add font from the subdirectory font/ of the Config_directory.
Does it make sense for all platforms ? (ie also for windows ?)

@@ -288,6 +288,11 @@ void Init_text(void)
   strcpy(directory_name, Data_directory);
   strcat(directory_name, FONTS_SUBDIRECTORY);
   For_each_file(directory_name, Add_font);
+  // fonts subdirectory in Config_directory
+  strcpy(directory_name, Config_directory);
+  strcat(directory_name, "/fonts");
+  For_each_file(directory_name, Add_font);
   #if defined(__WIN32__)
     // Parcours du r<E9>pertoire systeme windows "fonts"

comment:5 by PulkoMandy, 6 years ago

I don't remember how this works in Windows, I think the data dir is in "C:\Programs", and the config dir is in "C:\Users\AppData\...", unless you use a "portable" (no installer) version of the app, in which case I have no idea what happens.

comment:8 by Thomas Bernard, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.