Customize the Genealogical Symbols lookup table

From Gramps
Revision as of 19:00, 20 March 2021 by Bamaustin (talk | contribs) (See also)
Jump to: navigation, search
Gramps-notes.png

This article's content is incomplete or a placeholder stub.
Please update or expand this section.


Gnome-important.png
temporary Workaround

This article is not intended for casual use. The Genealogical Symbols feature was a recent addition in the Gramps 5.1 version. Some function are not yet configurable through the interface.

Genealogical Symbols

Allows you to use Genealogical Symbols instead of text abbreviations in reports, charts and the Gramps interface.

This tab gives you the possibility to use one font which is able to show all genealogical symbols. (Once configured see: Prerequisite to use Genealogical Symbols)

If you select the ☑use symbols checkbox, Gramps will use the selected font if it exists.

If the fontconfig prerequisite has been installed, then on the Edit ➡ Preferences ➡ Genealogical Symbols select the Try to find button, Gramps will attempt to detect any suitable unicode text fonts that include gylphs for all the required symbols.

Fig. Symbols.1 "Genealogical Symbols" - initial Preferences tab

After clicking the Try to find button in the Edit ➡ Preferences ➡ Genealogical Symbols tab

Fig. Symbols.2 "Genealogical Symbols" - Finding fonts
Tango-Dialog-information.png
Fonts must include all gylphs to be recognized.

The full set of Genealogical Symbols required by this feature are not defined in every font family. Many of the death glyphs are religious representations and were omitted as a form of conflict avoidance.

For a test Windows 10 computer with 191 font families installed, only one Unicode font (Segoe UI Symbol) was found that included all the required glyphs.


When the search has completed select one of the fonts from the Choose font pop-up menu list and then select the ☑use symbols checkbox.

Fig. Symbols.3 "Genealogical Symbols" - Preferences tab - activated defaults
List of Genealogical Symbols shown (listed in order shown in the What you will see: preview at the bottom of the tab):
meaning symbol Unicode code point(s) name
female U+2640 Female Sign
male U+2642 Male Sign
gender unknown ⚪︎ U+26AA Medium White Circle
Lesbianism U+26A2 Doubled female sign
Male homosexuality U+26A3 Doubled male sign
Heterosexuality U+26A4 Interlocked female and male sign
hermaphrodite U+26A4 Interlocked Male and Female Sign
transgender U+26A6 Male with stroke sign
neuter U+26B2 Neuter
born illegitimately U+229B Circled Asterisk Operator
birth * U+002A Asterisk
baptism, christening ~ U+007E Tilde
engaged U+26AC Small White Circle
married U+26AD Marriage Symbol
divorced U+26AE Divorce Symbol
unmarried U+26AF Unmarried Partnership Symbol
burial ⚰︎ U+26B0 Coffin
cremation ⚱︎ U+26B1 Funeral Urn
killed in action ⚔︎ U+2694 Crossed Swords
this line extinct U+2021 Double Dagger
death ✝︎ U+271D Latin Cross
Not included in Preview
stillborn ✝︎* U+0086 U+002A Latin Cross, Asterisk
born illegitimately *⃝ U+002A U+20DD Circled Asterisk
approximate(ly) ± U+00B1 Plus-Minus
before < U+003C Less-Than Symbol
after > U+003E Greater-Than Symbol


Fig. Symbols.4 Relationships Category view in Gramps version 5.0

Prior to the Genealogical Symbols feature being implemented, birth and death data were explicitly labeled in English for the Active Person. This data was labeled with a simple abbreviation of label where more compact display was needed for the other relatives.

The Relationship category view to the right shows the superseded English label method.

Fig. Symbols.5 Relationships Category view in Gramps version 5.1

It was determined that these English labels did not encourage localization. An arbitrary set of symbols had been proposed that was deemed more universal than English terms and abbreviations.

This set of symbols has been hard-coded, following a [Tamura Jones expounds on 30-year old recommendation for genealogical software. However, these recommendations were based on the very limited options in early personal computers. The symbols used for birth & death are re-purposed from mathematical operators. This raises objections about ambiguity.

Other than choosing between text & pictographs, the Preferences options are limited. Choosing a font only subtly affects symbol renderings. But you can also select from a variety of death symbols.

On the other hand, genealogical charts and books have been being printed for centuries. It is possible to hack the hard-coding to use other standards.

Genealogy symbols preferences

Advanced Manipulation of Settings - you can manually editing the gramps.ini configuration ini file stored in the Gramps version sub-folder of the user directory.

However, this section store a negligible amount of information. Rather being Advanced manipulation, hacking this configuration file offers little value. The most common hack will be to delete the subsection entirely and allow Gramps to re-create it with default settings.

The files in the user directory do not need SuperUser privileges to modify. However, restrictions related to multi-user permissions will apply.

Initially, the preferences section related to Genealogical symbols are in a section labeled [utf8] (which stands for 8-bit Unicode Transformation Format) and it is created with commented out lines:

[utf8]
;;available-fonts=[]
;;death-symbol=13
;;in-use=0
;;selected-font=
Fig. Symbols.6 Selecting a Symbol
Name symbol
identifier
Displays Gramps
code
DEATH_SYMBOL_NONE 0
DEATH_SYMBOL_X x 1
DEATH_SYMBOL_SKULL 2
DEATH_SYMBOL_ANKH 3
DEATH_SYMBOL_ORTHODOX_CROSS 4
DEATH_SYMBOL_CHI_RHO 5
DEATH_SYMBOL_LORRAINE_CROSS 6
DEATH_SYMBOL_JERUSALEM_CROSS 7
DEATH_SYMBOL_STAR_CRESCENT 8
DEATH_SYMBOL_WEST_SYRIAC_CROSS 9
DEATH_SYMBOL_EAST_SYRIAC_CROSS 10
DEATH_SYMBOL_HEAVY_GREEK_CROSS 11
DEATH_SYMBOL_LATIN_CROSS 12
DEATH_SYMBOL_SHADOWED_LATIN_CROSS 13
DEATH_SYMBOL_MALTESE_CROSS 14
DEATH_SYMBOL_STAR_OF_DAVID 15
DEATH_SYMBOL_DEAD Dead 16

The selection of the Death symbol seems to default to '12' or 'Latin Cross'. So, we'll keep in mind that the hacking row 12 on the preset table of alternate Death symbols is the most likely target. After selecting a font and enabling the Genealogical Symbols sets the configuration section to:

[utf8]
available-fonts=['Segoe UI Symbol']
death-symbol=12
in-use=1
selected-font='Segoe UI Symbol'


Built-in date label options

The Relationship category view to the right shows the symbolic (language agnostic) labeling method created for the 5.1 version of Gramps.

Fig. Symbols.7 "Genealogical Symbols" - Relationship View - default display for version 5.1

The Relationship category view to the right also shows the language agnostic labeling method created for the 5.1 version of Gramps. (The Gramplet bars have been turned off to reduce distracting clutter.) The data for Sibling 2 has been changed to display the baptismal and burial date text styling variants. These are only shown in this view when an explicit date for birth (or death) is missing. These dates are italicized to indicate that they are inferred by other events, not the actual birth or death dates.


Fig. Symbols.8 "Genealogical Symbols" - Relationship View - enabled defaults


Hacking the date labels

Where are the Symbol definitions are stored in Gramps

The definitions for Genealogical Symbols for Gramps labels are located in the Gramps application directory. The relative file subpath is: gramps\gen\utils\symbols.py

The exact Gramps application directory path varies by OS:

Linux
Windows
MacOS

Application files & sub-directories often have hidden, write-restricted and/or write-protected file permissions. To hack the Genealogical Symbol set, you may need to un-hide the folder and open the file for editing using Administrator (Superuser) privileges.

If the file is modified beyond usability, a backup copy of the file is archived on GitHub at :

       https://github.com/gramps-project/gramps/blob/maintenance/gramps51/gramps/gen/utils/symbols.py 

The pertinent (unmodified) sections of the symbols.py file are:

   all_symbols = [
              # Name                     UNICODE       SUBSTITUTION
              (_("Female"),              '\u2640',     ""),
              (_("Male"),                '\u2642',     ""),
              (_("Asexuality, sexless, genderless"), '\u26aa', ""),
              (_("Lesbianism"),          '\u26a2',     "oo"),
              (_("Male homosexuality"),  '\u26a3',     "oo"),
              (_("Heterosexuality"),     '\u26a4',     "oo"),
              (_("Transgender, hermaphrodite (in entomology)"), '\u26a5', ""),
              (_("Transgender"),         '\u26a6',     ""),
              (_("Neuter"),              '\u26b2',     ""),
              (_("Illegitimate"),        '\u229b',     ""),
              (_("Birth"),               '\u002a',     "*"),
              (_("Baptism/Christening"), '\u007e',     "~"),
              (_("Engaged"),             '\u26ac',     "o"),
              (_("Marriage"),            '\u26ad',     "oo"),
              (_("Divorce"),             '\u26ae',     "o|o"),
              (_("Unmarried partnership"), '\u26af',   "o-o"),
              (_("Buried"),              '\u26b0',     "d"),
              (_("Cremated/Funeral urn"), '\u26b1',    "d"),
              (_("Killed in action"),    '\u2694',     "d"),
              (_("Extinct"),             '\u2021',     ""),
             ]
   # genealogical death symbols
   DEATH_SYMBOL_NONE                      = 0
   DEATH_SYMBOL_X                         = 1
   DEATH_SYMBOL_SKULL                     = 2
   DEATH_SYMBOL_ANKH                      = 3
   DEATH_SYMBOL_ORTHODOX_CROSS            = 4
   DEATH_SYMBOL_CHI_RHO                   = 5
   DEATH_SYMBOL_LORRAINE_CROSS            = 6
   DEATH_SYMBOL_JERUSALEM_CROSS           = 7
   DEATH_SYMBOL_STAR_CRESCENT             = 8
   DEATH_SYMBOL_WEST_SYRIAC_CROSS         = 9
   DEATH_SYMBOL_EAST_SYRIAC_CROSS         = 10
   DEATH_SYMBOL_HEAVY_GREEK_CROSS         = 11
   DEATH_SYMBOL_LATIN_CROSS               = 12
   DEATH_SYMBOL_SHADOWED_LATIN_CROSS      = 13
   DEATH_SYMBOL_MALTESE_CROSS             = 14
   DEATH_SYMBOL_STAR_OF_DAVID             = 15
   DEATH_SYMBOL_DEAD                      = 16
   # The following is used in the global preferences in the display tab.
   #                Name
   #                                                  UNICODE    SUBSTITUTION
   death_symbols = [(_("Nothing"),                    "",        ""),
                    ("x",                             "\u03a9",  "x"),
                    (_("Skull and crossbones"),       "\u2620",  "+"),
                    (_("Ankh"),                       "\u2625",  "+"),
                    (_("Orthodox cross"),             "\u2626",  "+"),
                    (_("Chi rho"),                    "\u2627",  "+"),
                    (_("Cross of Lorraine"),          "\u2628",  "+"),
                    (_("Cross of Jerusalem"),         "\u2629",  "+"),
                    (_("Star and crescent"),          "\u262a",  "+"),
                    (_("West Syriac cross"),          "\u2670",  "+"),
                    (_("East Syriac cross"),          "\u2671",  "+"),
                    (_("Heavy Greek cross"),          "\u271a",  "+"),
                    (_("Latin cross"),                "\u271d",  "+"),
                    (_("Shadowed White Latin cross"), "\u271e",  "+"),
                    (_("Maltese cross"),              "\u2720",  "+"),
                    (_("Star of David"),              "\u2721",  "+"),
                    (_("Dead"),                       _("Dead"), _("Dead"))
               ]


Simulating previous Symbol definitions

Fig. Symbols.9 "Genealogical Symbols" - Relationship View - text substitutions
Data text label abbreviated
birth Birth b.
baptism bap.
christening chr.
death Death d.
burial Burial bur.
married Marriage mar.
divorced Divorce div.
   all_symbols = [
              # Name                     UNICODE       SUBSTITUTION
              (_("Birth"),               '\u03b1',     "b."),
              (_("Baptism/Christening"), '\u224b',     "bap."),
              (_("Marriage"),            '\u26ad',     "mar."),
              (_("Divorce"),             '\u26ae',     "div."),
              (_("Buried"),              '\u26b0',     "bur."),
   # The following is used in the global preferences in the display tab.
   #                Name
   #                                                  UNICODE    SUBSTITUTION
   death_symbols = [(_("Nothing"),                    "",        ""),
                    ("x",                             "\u03a9",  "d."),
                    (_("Latin cross"),                "\u271d",  "d."),


Alternative Symbol definitions

Fig. Symbols.10 "Genealogical Symbols" - Relationship View - Alpha & Omega text
Data abbreviated
birth α
baptism
christening
death Ω
burial
married
divorced
   all_symbols = [
              # Name                     UNICODE       SUBSTITUTION
              (_("Birth"),               '\u03b1',     "b."),
              (_("Baptism/Christening"), '\u224b',     "≋"),
              (_("Marriage"),            '\u26ad',     "mar."),
              (_("Divorce"),             '\u26ae',     "div."),
              (_("Buried"),              '\u26b0',     "bur."),
   # The following is used in the global preferences in the display tab.
   #                Name
   #                                                  UNICODE    SUBSTITUTION
   death_symbols = [(_("Nothing"),                    "",        ""),
                    ("x",                             "\u03a9",  "d."),
                    (_("Latin cross"),                "\u271d",  "d."),


See also

Linux
Windows
MacOS
Relationship view - * and oo
Issue with 5.1.2 on Ubuntu 18.04