font-manager icon indicating copy to clipboard operation
font-manager copied to clipboard

Browse fonts by location

Open gzagatti opened this issue 2 years ago • 10 comments

Is your feature request related to a problem? Please describe. I would like to browse my fonts by location.

Describe the solution you'd like To create a new category where fonts would be organized according to their system location.

Describe alternatives you've considered Right clicking on the font and selecting "Show in Folder". Alternatively, it's only possible to see the fonts split in two categories: System and User. Within User, it's not possible to see the folders where fonts are located.

Additional context I have fonts in different parts of my system. It would be useful to navigate my library as if I'm using a file picker.

gzagatti avatar Feb 15 '22 02:02 gzagatti

I'm not so sure I like this idea. Providing what amounts to a directory tree in the categories area sounds messy and not all that useful to me, the application is not intended to be a file picker, at all. Location has never been a criteria for selecting one font over another, at least for me.

Aside from that, we already provide extensions so that you can quickly preview fonts while using an actual file manager, you can also type / followed by the last part or any part of the filepath into the search box to filter the list that way.

I am interested in the main reasons you find those two options lacking though.

What's missing from the file manager extension that you would get while in the application?

JerryCasiano avatar Feb 15 '22 04:02 JerryCasiano

Thanks for your response!

My use case is that I was trying to consolidate all my user Fonts which are currently split between ~/.fonts, ~/.local/share/fonts and other sources that I curate for websites, etc. Second, I was trying to locate any other font source that I am not aware of but which the system is picking up. Third, I was trying to locate and eliminate duplicate font files used by the system.

I was not aware of the extensions. The file manager extension would be very helpful in my organization task. Do I need to compile Font Manager myself to get them activated? I installed Font Manager using the Ubuntu instructions, but the file manager extension does not seem to be working.

Second, search by file path with / is very useful. I can finally filter according to the source of the fonts. However, it cannot really differentiate between ~/.fonts and ~/.local/share/fonts since they both end in fonts. It would be useful to search for the whole path instead. Also, I cannot really see the total number of fonts filtered unless I select all the fonts and right click on it.

If a full directory tree under categories look messy. What about allowing the user to add dynamic collections that show fonts according to a certain search criteria? I don't really need to see the whole directory tree, but I might want to have quick access to folders with curated fonts (which I add from Settings > Sources).

Finally, it would be great if I could quickly see the path in which fonts are installed from the manager. Perhaps a good place to display this information is under the Properties tab of the the Manage view. I can see that this section even displays the file size.

gzagatti avatar Feb 16 '22 02:02 gzagatti

The file manager extensions are in the PPA, the extension name varies based on the file manager.

nautilus-font-manager nemo-font-manager thunar-font-manager

Once you install an extension, completely restart the file manager so that the extension gets loaded. Right clicking and opening a font file using font-manager will open a small font viewer which will update to match your selections in the file manager as long as you keep it open. The extension will also add an install option to the right click menu and in the case of Thunar some very basic bulk renaming options.

"Smart" collections are something that i've been thinking about doing since forever, unfortunately I still haven't gotten around to it... It's definitely on the todo list. BUT I just want to be clear, it's probably going to be a while. Especially with a GTK 4 port likely to become a high priority soon.

Because this issue has sort of gotten a little off track I'm going to suggest that you open a new issue something like "[Feature Request] Smart Collections" as a reminder / motivator on that front.

As far as displaying the filepath directly in the interface, I'm not really a fan of this idea for multiple reasons but primarily because filepaths are nasty looking and completely unpredictable, in the majority of cases they'll end up getting "ellipsized" due to length which makes even attempting to display them pointless.

If you're just looking for a quick peek at the filepath I could definitely see adding the filepath in a tooltip or something like that if that would help your use case?

We could maybe make the file size entry a clickable link and display the filepath on hover. Let me know if that would help, that's something we can get done pretty easily.

JerryCasiano avatar Feb 16 '22 04:02 JerryCasiano

I've installed nautilus-font-manager and it works really well. Indeed, with this extension there is no need to have a file tree in the Font Manager app itself.

Showing the path in a tool-tip could be useful, but I think it might be a bit obstructive. I usually browse fonts in the Manage view with the arrow keys and have the tab with the relevant information active. In that way, I can quickly see the information I am after as I switch fonts.

If I may make an alternative suggestion, what about a tab with only system information? For instance, I have notice that the attribution information also varies from font to font. This heterogeneous information gets neatly displayed on the right-hand side of the properties tab with line breaks. Something similar could be available under System information, where you could display all the paths in which the font are located with line breaks to avoid ellipsis, etc.

I will open an issues about Smart Collections.

gzagatti avatar Feb 17 '22 02:02 gzagatti

I also just found out that when searching fonts with / if there are duplicate fonts in the system. Font Manager will only show the fonts that it uploaded to its database.

For instance, I have the Hack font in two locations in my system. ~/.local/share/fonts/hack and ~/.local/share/google-fonts/hack. In each of these folders I have hack-Bold.ttf, hack-BoldItalic.ttf, hack-Italic.ttf and hack-Regular.ttf. When I search in Font Manager for /home/<username>/.local/share/fonts, it only returns me half of these fonts because the other half is sourced from the other folder. I would expect that all the fonts in the given folder would be returned.

gzagatti avatar Feb 17 '22 02:02 gzagatti

If I may make an alternative suggestion, what about a tab with only system information? For instance, I have notice that the attribution information also varies from font to font. This heterogeneous information gets neatly displayed on the right-hand side of the properties tab with line breaks. Something similar could be available under System information, where you could display all the paths in which the font are located with line breaks to avoid ellipsis, etc.

Hmm.

I'm not necessarily opposed to that since it could even be disabled by default and exposed as a preference for those that want it.

But what else would go into that tab? Having a tab with only file paths seems a little weird. If you have any ideas on that front let's flesh them out and see if something useful comes out of it. ;-)

I also just found out that when searching fonts with / if there are duplicate fonts in the system. Font Manager will only show the fonts that it uploaded to its database.

Yeah. We don't deal with duplicates. At least not yet. I've definitely thought about it but don't consider it a high priority.

Identifying duplicates that are active on the system is certainly something that could be filed as a feature request.

We won't ever actually expose them in the interface because that doesn't make much sense, but scanning for them, notifying the user and giving them options is certainly something that I think makes sense.

Same thing with broken fonts but that's a more complicated issue that won't happen anytime soon, if ever.

The other side of this is that the whole point of the application is to relieve users of all these little annoyances and busy work, so maybe that's why I've not been so keen on enabling some of these things. The premise is that you simply drag your files or folders onto the font list and stop caring about minor details like where they're stored or what they're named or whatever else. In the background they get sorted and renamed to something that makes more sense, duplicates get overwritten, etc. If you need to access the actual files for whatever reason, you export a collection or create a backup from the menu. Users for the most part don't care about these details so long as everything works as expected. We're definitely not there yet but that's the goal.

JerryCasiano avatar Feb 17 '22 04:02 JerryCasiano

Thanks for being open to brainstorming. A few things that could be shown in a system tab:

  • the file paths
  • whether the font is installed in the system and available
  • whether there are duplicate files
  • file size
  • font extensions (eg. if the font is available as ttf, otf, woff, etc.)

As I was playing with installing and uninstalling a Google font, I noticed that the program creates a folder in ~/.local/share/fonts to accommodate the font. But when the font is deleted, the parent folder is not deleted.

Likewise, Font Manager also makes fonts manually added from a source in the settings available system-wise. However, I was not able to pick how this tricky is done :)

The more I use the program, the more I understand why it's convenient to abstract away from the file system. It would be indeed overwhelming to show the full list of paths where a certain font could be installed. If the font was installed in many places (e.g. in the system, in the user folder and in a couple of website repositories), you could end up with a large number of paths. Showing this info could indeed be too much.

gzagatti avatar Feb 17 '22 14:02 gzagatti

I would also welcome being able to at least have an option to filter by "source" that has been added in the settings. I have my fonts well organized in folders to see which fonts are free, which I have bought and which are from customers etc. So while I might want to always have my bought fonts available, I might not want everything else installed/available all the time, and having such a filter would help a lot

da-anda avatar Jan 02 '24 13:01 da-anda

@da-anda

I'm not too keen on adding that...

You can already accomplish that to some extent by searching for filepath.

Start your search with a / then type part of the filepath doesn't have to be complete. The name of the folder should work.

JerryCasiano avatar Jan 02 '24 14:01 JerryCasiano

thanks. I gave up on the app for now anyways, since I couldn't figure out how it is supposed to work. At least nothing seemed to have worked for me using the flatpack on Fedora 39 (I'm trying to migrate from Windows to Linux and am still learning). Even with giving the flatpack app full system file access I could not see any of the fonts in any app, and "enabled" sources were disabled on next start of the font-manager. "Installed" fonts (which for some reason seem to have been copied to a different location and not just symlinked etc) did not show up anywhere (yes, apps have been restarted). I for now just added a couple locations to a ~/.fonts.conf file so that I can get my current job/task done. Maybe I'll give the GTK4 version a try again, once it's out. Thanks for the app though - it seems super useful - at least for people that understand how it works

da-anda avatar Jan 02 '24 14:01 da-anda