{"id":1345,"date":"2023-09-26T03:54:17","date_gmt":"2023-09-26T07:54:17","guid":{"rendered":"https:\/\/jausoft.com\/blog\/?p=1345"},"modified":"2023-09-26T04:25:39","modified_gmt":"2023-09-26T08:25:39","slug":"graphui-css-style-layout-fonts-more","status":"publish","type":"post","link":"https:\/\/jausoft.com\/blog\/2023\/09\/26\/graphui-css-style-layout-fonts-more\/","title":{"rendered":"GraphUI CSS Style Layout, Fonts &#038; More .."},"content":{"rendered":"\r\n<p>Continuing the <a href=\"https:\/\/jausoft.com\/blog\/tag\/graph_type_rendering\/\">Graph Type Rendering and UI<\/a> saga with some functional updates. Here our <a href=\"https:\/\/jogamp.org\/bugzilla\/\/show_bug.cgi?id=1456\">new CSS alike Grid and Box Layout<\/a> as well a glimpse into the migrated symbol fonts via our FontView01. You may also check our <a href=\"https:\/\/jogamp.org\/bugzilla\/\/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=CONFIRMED&amp;bug_status=IN_PROGRESS&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=core&amp;component=Plugin&amp;list_id=3114&amp;product=GraphUI&amp;query_format=advanced&amp;resolution=---&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;resolution=MOVED\">Bugzilla in regards to GraphUI<\/a> or for the <a href=\"https:\/\/jogamp.org\/bugzilla\/\/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=CONFIRMED&amp;bug_status=IN_PROGRESS&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=graph&amp;list_id=3115&amp;product=Jogl&amp;query_format=advanced&amp;resolution=---&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;resolution=MOVED\">JOGL \/ Graph module<\/a> as well as the easier to access <a href=\"https:\/\/jogamp.org\/wiki\/index.php?title=SW_Tracking_Report_Feature_Objectives_Overview#Graph\">wiki page of ours<\/a>.<\/p>\r\n\r\n\r\n\r\n<p><!--more--><\/p>\r\n\r\n\r\n\r\n<p>Walking through the source code is pretty boring, so I will just link a few examples regarding the <a href=\"https:\/\/jogamp.org\/bugzilla\/\/show_bug.cgi?id=1456\">new layout feature<\/a> from the demo code here.<\/p>\r\n<p><a href=\"https:\/\/jogamp.org\/cgit\/jogl.git\/tree\/src\/demos\/com\/jogamp\/opengl\/demos\/graph\/ui\/UISceneDemo03.java#n593\">UISceneDemo03&#8217;s right hand side group<\/a> of buttons.<\/p>\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter\"><a href=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo03-vbaa-s04-fsaa0-snap08-1280x0720-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"720\" class=\"wp-image-1347\" src=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo03-vbaa-s04-fsaa0-snap08-1280x0720-1.png\" alt=\"\" srcset=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo03-vbaa-s04-fsaa0-snap08-1280x0720-1.png 1280w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo03-vbaa-s04-fsaa0-snap08-1280x0720-1-300x169.png 300w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo03-vbaa-s04-fsaa0-snap08-1280x0720-1-1024x576.png 1024w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo03-vbaa-s04-fsaa0-snap08-1280x0720-1-768x432.png 768w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo03-vbaa-s04-fsaa0-snap08-1280x0720-1-1088x612.png 1088w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/figure>\r\n<\/div>\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n<p>Notable some buttons contain an <a href=\"https:\/\/jogamp.org\/bugzilla\/\/show_bug.cgi?id=1461\">newly integrated symbol font<\/a>, which can be easily utilized by a <a href=\"https:\/\/jogamp.org\/bugzilla\/\/show_bug.cgi?id=1462\">Glyph name lookup<\/a> and <a href=\"https:\/\/jogamp.org\/cgit\/jogl.git\/commit\/?id=893903d2ece1193aa87257bd6162754dfb89f9f9\">toggle&#8217;able Button support<\/a>.<\/p>\r\n\r\n<p><code>\r\n        buttonsRight.setLayout(new GridLayout(buttonWidth, buttonHeight, \r\n                      Alignment.Fill, \r\n                      new Gap(buttonHeight*0.50f, buttonWidth*0.10f), 7));\r\n        {\r\n            final Button button = new Button(options.renderModes, fontSymbols,\r\n                        fontSymbols.getUTF16String(\"play_arrow\"),\r\n                        fontSymbols.getUTF16String(\"pause\"),\r\n                        buttonWidth, buttonHeight, buttonZOffset);\r\n            button.setSpacing(symSpacing, fixedSymSize);\r\n            button.onToggle((final Shape s) -&gt; {\r\n                System.err.println(\"Play\/Pause \"+s);\r\n                animGroup.setTickPaused ( s.isToggleOn() );\r\n                if( s.isToggleOn() ) {\r\n                    animGroup.setTickPaused ( false );\r\n                    if( null != mPlayer ) {\r\n                        mPlayer.resume();\r\n                    }\r\n                } else {\r\n                    animGroup.setTickPaused ( true );\r\n                    if( null != mPlayer ) {\r\n                        mPlayer.pause(false);\r\n                    }\r\n                }\r\n            });\r\n            button.setToggle(true); \/\/ on == play\r\n            buttonsRight.addShape(button);\r\n        }\r\n\r\n<\/code><\/p>\r\n\r\n<div style=\"background-color: #ffffff; padding: 0px 0px 0px 2px;\">\r\n<div style=\"color: #000000; background-color: #ffffff; font-family: 'DejaVu Sans Mono'; font-size: 10pt; white-space: pre;\"><a href=\"https:\/\/jogamp.org\/bugzilla\/\/show_bug.cgi?id=1463\">One fine Glyph bug of our Font class<\/a> has been tackled in this last round of layout work,<br \/>which actually was there all the time but somehow ignored.<br \/>The calculated bounding box of one text line was always too big,<br \/>hence a label was always positioned too low in the Button &#8211; not centered correctly.<br \/>While adding a convenient way to use toggable symbols and hence adding the option<br \/>to obey a font&#8217;s fixed em-size &#8211; this issue had to be resolved.<br \/>We used the font&#8217;s ascend for whitespace and undefined Glyphs,<br \/>which exceeds the height of used label text and hence ruined the layout. \ud83d\ude09<\/div>\r\n<div>\u00a0<\/div>\r\n<div style=\"color: #000000; background-color: #ffffff; font-family: 'DejaVu Sans Mono'; font-size: 10pt; white-space: pre;\">Test bed for the <a href=\"https:\/\/jogamp.org\/cgit\/jogl.git\/tree\/src\/demos\/com\/jogamp\/opengl\/demos\/graph\/ui\/UILayoutGrid01.java#n167\">GridLayout is UILayoutGrid01<\/a>\r\n<figure><a href=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1350\" src=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1.png\" alt=\"\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1.png 1920w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1-300x169.png 300w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1-1024x576.png 1024w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1-768x432.png 768w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1-1536x864.png 1536w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutGrid01-vbaa-s04-fsaa0-snap00-1920x1080-1-1088x612.png 1088w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/figure>\r\n<p>and <a href=\"https:\/\/jogamp.org\/cgit\/jogl.git\/tree\/src\/demos\/com\/jogamp\/opengl\/demos\/graph\/ui\/UILayoutBox01.java#n244\">UILayoutBox01 for the BoxLayout<\/a><\/p>\r\n<figure><a href=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1351\" src=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1.png\" alt=\"\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1.png 1920w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1-300x169.png 300w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1-1024x576.png 1024w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1-768x432.png 768w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1-1536x864.png 1536w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UILayoutBox01-vbaa-s04-fsaa0-snap01-1920x1080-1-1088x612.png 1088w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/figure>\r\n<p>The BoxLayout was mostly used to group Shapes in a box <a href=\"https:\/\/jogamp.org\/cgit\/jogl.git\/tree\/src\/demos\/com\/jogamp\/opengl\/demos\/graph\/ui\/FontView01.java#n498\">like in FontView01<\/a>, the GlyphShape and the underline box.<\/p>\r\n<figure><a href=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01_uline-1280x0720-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1353\" src=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01_uline-1280x0720-1.png\" alt=\"\" width=\"1280\" height=\"720\" srcset=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01_uline-1280x0720-1.png 1280w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01_uline-1280x0720-1-300x169.png 300w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01_uline-1280x0720-1-1024x576.png 1024w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01_uline-1280x0720-1-768x432.png 768w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01_uline-1280x0720-1-1088x612.png 1088w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/figure>\r\n<p>The underline hack is sub-optimum due to skipping center in the BoxLayout,<br \/>here is a version without it<\/p>\r\n<p><a href=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01-1280x0720-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1352\" src=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/FontView01-vbaa-s03-fsaa0-FreeSerif_Regular_cp391-snap01-1280x0720-1.png\" alt=\"\" width=\"1280\" height=\"720\" \/><\/a><\/p>\r\n<p>Here one more set of Demo pictures from <a href=\"https:\/\/jogamp.org\/cgit\/jogl.git\/tree\/src\/demos\/com\/jogamp\/opengl\/demos\/graph\/ui\/UISceneDemo20.java#n465\">UISceneDemo02 <\/a><\/p>\r\n<figure><a href=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap00-1280x0720-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1348\" src=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap00-1280x0720-1.png\" alt=\"\" width=\"1280\" height=\"720\" srcset=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap00-1280x0720-1.png 1280w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap00-1280x0720-1-300x169.png 300w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap00-1280x0720-1-1024x576.png 1024w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap00-1280x0720-1-768x432.png 768w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap00-1280x0720-1-1088x612.png 1088w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/figure>\r\n<p>&#8230; and<\/p>\r\n<figure><a href=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap08-1280x0720-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1355\" src=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap08-1280x0720-1.png\" alt=\"\" width=\"1280\" height=\"720\" srcset=\"https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap08-1280x0720-1.png 1280w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap08-1280x0720-1-300x169.png 300w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap08-1280x0720-1-1024x576.png 1024w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap08-1280x0720-1-768x432.png 768w, https:\/\/jausoft.com\/blog\/wp-content\/uploads\/2023\/09\/UISceneDemo20-vbaa-s04-fsaa0-snap08-1280x0720-1-1088x612.png 1088w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/figure>\r\n<p>More updates on already checked-in code and new stuff soon &#8230;<\/p>\r\n<p style=\"text-align: center;\">***<\/p>\r\n<p>And now .. the painful but required call for related project work, funding or otherwise.<\/p>\r\n<\/div>\r\n<blockquote>\r\n<div style=\"color: #000000; background-color: #ffffff; font-family: 'DejaVu Sans Mono'; font-size: 10pt; white-space: pre;\">All big &amp; medium sized firms &#8211; as well other hybrid commercial projects, <br \/>are strongly invited to <a href=\"https:\/\/jogamp.org\/wiki\/index.php?title=Maintainer_and_Contacts#Sven_Gothel\" target=\"_top\" rel=\"nofollow noopener\">contact me<\/a>\u00a0to discuss the next steps forward (if any). <br \/>I would suggest to setup meetings with their stakeholders and discuss a plan forward. <br \/><br \/><i>A one person full time compensation might be enough, two person support would be awesome.<\/i><br \/><b>See <a href=\"https:\/\/words.filippo.io\/pay-maintainers\/\" target=\"_top\" rel=\"nofollow noopener\">How to pay professional maintainers<\/a>. <br \/><\/b><br \/><br \/>^^ this is not directed to any hobby or small-biz entity using the project, <br \/>but more so directed at whats left in the ethics department of the bigger corps &amp; orgs :-\/ <br \/>Interestingly enough, it always were the small biz corps supporting this project the most! <br \/><strong>THANK YOU!<\/strong> <br \/>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n<\/blockquote>\r\n<\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>Continuing the Graph Type Rendering and UI saga with some functional updates. Here our new CSS alike Grid and Box Layout as well a glimpse into the migrated symbol fonts via our FontView01. You may also check our Bugzilla in regards to GraphUI or for the JOGL \/ Graph module as well as the easier&hellip; <a class=\"more-link\" href=\"https:\/\/jausoft.com\/blog\/2023\/09\/26\/graphui-css-style-layout-fonts-more\/\">Continue reading <span class=\"screen-reader-text\">GraphUI CSS Style Layout, Fonts &#038; More ..<\/span> <span class=\"meta-nav\" aria-hidden=\"true\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[7,3,8,1],"tags":[9,13,22,71,16,44,17,46,68],"class_list":["post-1345","post","type-post","status-publish","format-standard","hentry","category-3d-opengl","category-computer-stuff","category-jogamp","category-uncategorized","tag-3d","tag-embedded-device","tag-fonts","tag-graph_type_rendering","tag-java","tag-jogamp","tag-opengl","tag-openjdk","tag-type-rendering"],"_links":{"self":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts\/1345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/comments?post=1345"}],"version-history":[{"count":19,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts\/1345\/revisions"}],"predecessor-version":[{"id":1372,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts\/1345\/revisions\/1372"}],"wp:attachment":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/media?parent=1345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/categories?post=1345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/tags?post=1345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}