How do I set unicode ranges in fonts used by Webkit?
I took this example - https://wiki.gnome.org/Projects/WebKitGtk/ProgrammingGuide/Tutorial - and ran it on my Linux Mint system. I program using GTK+. To the program at the above link, I added the following lines, and while it shows certain glyph from myfont, not all glyphs are displayed. WebKitSettings *wsettings = webkit_web_view_get_settings(webView); webkit_settings_set_default_font_family(wsettings, "myfont"); webkit_settings_set_monospace_font_family(wsettings, "myfont"); webkit_settings_set_serif_font_family(wsettings, "myfont"); webkit_settings_set_sans_serif_font_family(wsettings, "myfont"); How do I specify enabling a unicode range? I want it to have the ability to display everything from U+0001 to U+FFFF because I have some custom glyphs in many places which are spread across the range. I tried adding a css file with @font-face section in it and I tried loading it with gtk_css_provider_load_from_path and gtk_style_context_add_provider_for_screen, but I get a run time error message which says "unknown @ rule." My css file contains the following and nothing else: @font-face { font-family: 'myfont'; src: url('/home/marco/fontfiles/myfont.ttf') format("truetype"); unicode-range: U+0000-FFFF; } I tried this on Linux Mint 19 and I have libgtk-3-dev version 3.22.30 which it says is already at the newest version. Thanks for any response. ~marco
participants (1)
-
marcoricci2012@yahoo.com