{"id":2255,"date":"2018-02-21T00:00:25","date_gmt":"2018-02-21T04:00:25","guid":{"rendered":"http:\/\/wizardwalk.com\/newblather\/?p=2255"},"modified":"2018-02-21T00:01:43","modified_gmt":"2018-02-21T04:01:43","slug":"font-programming-fun","status":"publish","type":"post","link":"https:\/\/wizardwalk.com\/newblather\/?p=2255","title":{"rendered":"Font programming fun"},"content":{"rendered":"<p>So I&#8217;ve started working on GUI elements for my little engine that could. My quick list of things I&#8217;d like to include in a GUI system:<\/p>\n<ul>\n<li>ability to create a menu bar<\/li>\n<li>ability to create windows \/ panels with drop shadows<\/li>\n<li>ability to create scroll bars for window content<\/li>\n<li>ability to create buttons and button animations (hover, click)<\/li>\n<li>ability to create text boxes and text fields<\/li>\n<\/ul>\n<p>I started working on text today, i.e., font rendering. The NV path rendering extension actually does a pretty good job with larger text:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-large wp-image-2258\" src=\"http:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontBig-1024x598.png\" alt=\"\" width=\"656\" height=\"383\" srcset=\"https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontBig-1024x598.png 1024w, https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontBig-300x175.png 300w, https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontBig-768x449.png 768w, https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontBig.png 1294w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p>It&#8217;s not so good with smaller text:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-large wp-image-2257\" src=\"http:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontsmall-1024x598.png\" alt=\"\" width=\"656\" height=\"383\" srcset=\"https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontsmall-1024x598.png 1024w, https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontsmall-300x175.png 300w, https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontsmall-768x449.png 768w, https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/fontsmall.png 1294w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p>Look at that ugly subpixel rendering:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2256\" src=\"http:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/subpixel.png\" alt=\"\" width=\"424\" height=\"120\" srcset=\"https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/subpixel.png 424w, https:\/\/wizardwalk.com\/newblather\/wp-content\/uploads\/2018\/02\/subpixel-300x85.png 300w\" sizes=\"(max-width: 424px) 100vw, 424px\" \/><\/p>\n<p>Bleh! So I&#8217;ll have to figure out something else for smaller fonts. I&#8217;ll probably look into the Java AWT package, or perhaps look into <a href=\"https:\/\/github.com\/memononen\/nanovg\">NanoVG<\/a>, especially since it looks like lwjgl already has bindings for it. (Maybe it already has everything I want?)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;ve started working on GUI elements for my little engine that could. My quick list of things I&#8217;d like to include in a GUI system: ability to create a menu bar ability to create windows \/ panels with drop shadows ability to create scroll bars for window content ability [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[19],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7gI4B-An","_links":{"self":[{"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=\/wp\/v2\/posts\/2255"}],"collection":[{"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2255"}],"version-history":[{"count":2,"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=\/wp\/v2\/posts\/2255\/revisions"}],"predecessor-version":[{"id":2260,"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=\/wp\/v2\/posts\/2255\/revisions\/2260"}],"wp:attachment":[{"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wizardwalk.com\/newblather\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}