-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symbols enhancement. #996
Symbols enhancement. #996
Conversation
Add the possibility to set all default value to a string. Gui configuration improvement. Possibility to drag and drop a symbol from the symbol list. In this case, the glyph must be present in the current font to be displayed.
Codecov Report
@@ Coverage Diff @@
## master #996 +/- ##
==========================================
- Coverage 41.94% 41.91% -0.03%
==========================================
Files 1071 1071
Lines 145765 145870 +105
==========================================
+ Hits 61138 61144 +6
- Misses 84627 84726 +99
Continue to review full report at Codecov.
|
Replace death symbol by buried, cremated or killed symbol depending on the event type (get_death_or_fallback)
I tried this out and I like parts of it. But I decided that the Preferences tab could use some work, it was too large to fit on smaller screens. I remain concerned that using the symbols sets all of Gramps to the specified font; this is somewhat counter to the style guidelines. I note that in most cases this is not really necessary, the Gtk/fontconfig font substitution seems to find the necessary character glyphs, in fact I have not seen a case where this did NOT work. But if you think we really need to specify a font, wouldn't it be better to use markup with the symbols, rather than make the whole GUI change? I realize that this would require changes in a lot of places, replacing 'set_text' methods with 'set_markup' or similar. But I think the end result might be better. We could include the necessary markup in the symbol strings... |
Yes. We shouldn't really change the font for the entire interface. Perhaps we could create a subclass of |
Thanks to Paul Culley for the ideas.
Did you try this on old OSes without unicode in standard ? |
The AIO (for Windows) has not supported winxp for several years now, probably sometime in the Gramps 4.0.x timeframe. I would be more concerned about OSX or possibly some older versions of Linux, if they did not support fontconfig. |
Gnome and MacOS X/10 have fully supported Unicode since their inception, no worries there. On MacOS fontconfig is a small problem as I didn't know about the dependency on python fontconfig and don't include it in the Mac bundle. It's unfortunate that it's necessary because fontconfig has only a minimal annotation for gobject-introspection that doesn't include the API you need. On the other hand Apple provides a typeface, Apple Symbols, that I think provides glyphs for all of the genealogy code points. It has only symbols so it's not suitable for setting application-wide, but if you can fix Gramps so that it uses the symbol font only for the symbols then we can hard-code the Apple Symbols font for MacOS and skip the search and its dependency on fontconfig. |
I spent some time trying to figure out how we might avoid changing the font for the whole interface; and I understand that the changes would be at least extensive, bordering on impossible. Too many places that don't support markup. I decided to test out your latest commit (using the default font). I observed a problem with the font section combo, due to a mixup in the row to which it was attached. I fixed that and then decided to expand on the idea of the default font. I also changed the text of some messages a bit; I think some of these didn't sound right to my American English ear. |
When I started this, a few fonts contained all the symbols. It appears now this is no more the case. |
You don't really need a python wrapper for most fontconfig commands, they're stand-alone programs. (Try |
Yes, I know that and began to write a patch on that. I saw I had 7900 fonts on my system and only 76 didn't have all the symbols. This is why I propose to suppress that and use the standard font defined for the user desktop. Could this generate problems on macs ? |
Depends on what you mean by problems. On a stock Mac most of the miscellaneous symbols block (U+2600-U+26FF) are provided only by that Apple Symbols face I mentioned earlier. I guess the simplest work-around is to find some Free TTF that supports the whole basic plane, include it in the bundle, and make it the default for MacOS. |
@jralls On the MAC installation does Gtk use fontconfig to do the font substitution? On my systems this seems to work pretty well, as it pulls the necessary glyphs from the closest font that contains the symbol. So I would expect that you would end up with Glyphs from 'Apple Symbols' even when a different font was used as the primary one. |
@prculley It doesn't do font substitution at all on windows or MacOS unless one forces pango to use the ft2 backend; normally pango uses the native backends (pangowin32 and pangocoretext) neither of which do substitution. |
@jralls I guess I should be more specific; the way Gramps AIO is built on Windows (with msys2/mingw) it looks a lot like Linux. It DOES use the fontconfig backend as the default backend. I don't think anyone has ever successfully built Gramps with the MSoft toolset, so the backend used there is not interesting. But that answers my question about MacOS; no font substitution. So we need a good answer for there. |
@prculley, Not necessarily. Pango does have a |
What I know about 'C' and building is just enough to get me in trouble... I've got the Windows code to force fontconfig by inserting: |
That might work, But like I said, I need a way to test it. Is there a string somewhere in in |
This PR in its current form has the string of all the symbols in the Genealogical Symbols tab of Preferences. Just make sure that the font selected is 'default'. Or paste |
Well, I tried setting |
FWIW I pasted your string into an unadulterated Gramps Notes window and most of them worked. The ones that didn't were |
Codecov Report
@@ Coverage Diff @@
## master #996 +/- ##
==========================================
- Coverage 41.94% 41.35% -0.59%
==========================================
Files 1071 1059 -12
Lines 145765 143095 -2670
==========================================
- Hits 61138 59178 -1960
+ Misses 84627 83917 -710
Continue to review full report at Codecov.
|
I close this PR and make a new one for 5.1.3 |
Add the possibility to set all default values to a string.
Gui configuration improvement.
Possibility to drag and drop a symbol from the symbol list.
In this case, the glyph must be present in the current font to be displayed.