[GNC-dev] [GNC] GnuCash 3.906 Released

John Ralls jralls at ceridwen.us
Thu Jun 25 12:45:09 EDT 2020


Bob,

Yes, that should work.

Regards,
John Ralls


> On Jun 25, 2020, at 1:21 AM, Robert Fewell <14ubobit at gmail.com> wrote:
> 
> I think for now we should disable it for MacOS until a solution presents
> itself, maybe I will get a Macbook so I can test this.
> John, is this right...
> void
> gnc_assoc_cell_set_use_glyphs (AssocCell *cell)
> {
> #ifdef MAC_INTEGRATION
>    cell->use_glyths = FALSE;
> #else
>    gboolean use_glyphs = TRUE;
>    gchar *test_text;
>    GtkWidget *label;
>    PangoLayout *test_layout;
>    gint count;
> 
>    g_return_if_fail (cell != NULL);
> 
>    label = gtk_label_new (NULL);
>    test_text = g_strconcat (GLYPH_LINK, ",", GLYPH_PAPERCLIP, NULL);
>    test_layout = gtk_widget_create_pango_layout (GTK_WIDGET (label),
> test_text);
> 
>    pango_layout_set_text (test_layout, test_text, strlen (test_text));
> 
>    count = pango_layout_get_unknown_glyphs_count (test_layout);
> 
>    if (count != 0)
>        use_glyphs = FALSE;
> 
>    g_object_unref (test_layout);
>    g_free (test_text);
> 
>    cell->use_glyphs = use_glyphs;
> #endif
> }
> 
> 
> On Thu, 25 Jun 2020 at 02:10, Adrien Monteleone <
> adrien.monteleone at lusfiber.net> wrote:
> 
>> I’d be happy to play with the CSS, but I don’t see a way to target that
>> cell. All I get are the sheet and the entry cell.
>> 
>> Regards,
>> Adrien
>> 
>>> On Jun 24, 2020 w26d176, at 8:05 PM, John Ralls <jralls at ceridwen.us>
>> wrote:
>>> 
>>> Font handling in Gtk on MacOS is weird: Pango only calculates the layout
>> for computing box sizes. The actual glyph selection and layout is handled
>> by Cairo, and I don't think it knows how to use CoreText's font
>> substitution. WebKitGtk complicates matters by requiring the FreeType2
>> Pango backend as well and that does its own font substitution. Regardless,
>> pango is finding the emojis so the test passes. Cairo isn't putting a
>> missing glyph glyph there like I'd expect. I haven't yet figured out why
>> not.
>>> 
>>> I can think of two avenues to try: Simply forcing have_glyphs to false
>> on MacOS would display the regular letters. Not as pretty but it's sure to
>> work. A bit more difficult and in need of testing would be to use CSS to
>> set the font family for the Association cell to Apple Color Emojis on MacOS.
>>> 
>>> Regards,
>>> John Ralls
>> 
>> 
>> _______________________________________________
>> gnucash-devel mailing list
>> gnucash-devel at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>> 
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel



More information about the gnucash-devel mailing list