Hi, I suspect that elm_code is not "correctly" using a default theme font. It simply picks the first monospaced font it can find at a default size. This may be why NULL is the default rather than a named font...
What is the "right" way do people think? Andrew On Tue, 2 May 2017 at 22:55, William L. Thomson Jr. <wlt...@o-sinc.com> wrote: > On Tue, 2 May 2017 23:50:17 +0300 > Daniel Hirt <hirt.da...@gmail.com> wrote: > > > Hello, > > > > Off the top of my head: upon creating the elm_code widget, store the > > result of 'elm_code_widget_font_get' as your "default font". Then, > > reverting is just doing 'elm_code_widget_font_set' with the stored > > "default font". > > For what ever reason this is working now. Though I tried it before and > had commented out the line. Uncommenting and passing NULL seems to be > working. Though I could have sworn I tried it many times and it did > not. Maybe something else was causing the issue. > > https://github.com/Obsidian-StudiosInc/ecrire/blob/wltjr/src/bin/ui/settings_dialog.c#L78 > > > As a side note: I am not sure elm_code_widget utilizes the theme for > > fonts. > > I am still semi-curious how to fetch the default font in general. From > any object or widget. Seems some font is in use, but how to get that > name? Unless its just relying on fontconfig or something underneath not > sure. > > The above works in a way but reverting back to a hard coded font, > "Mono". As was pointed out in irc. > > https://git.enlightenment.org/core/efl.git/tree/src/lib/elementary/elm_code_widget.c#n2052 > > If the system font was not Mono, would that reset it back to what ever > the custom one? I think it would go back to Mono vs their font. I have > to experiment with that. > > -- > William L. Thomson Jr. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- http://andywilliams.me http://ajwillia.ms ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel