Dev Log 2018-05-09¶
Multi-line text in text area gadgets is now completed. Getting the line height and spacing correct was a bit trickier than expected. This may partially be my misunderstanding how FreeType’s data should be used. FreeType recommends a baseline-to-baseline line spacing, but this was smaller than the sum of ascender and descender distance in my test fonts, which seems like an error on the font’s part. I work around it by using either the height recommendation or the ascender + descender distance, whichever is larger.
I moved debug grid drawing code out of ng’s renderer, placing that burden on the user’s code instead. The debug grid shows evenly spaced lines on the x and y axis. This is extremely useful for verifying things are the correct size and location; I’m just not sure it belongs in the core renderer. Since the user can hook the RENDER_CLEAR event and do whatever they want with the context, I’ll let user code handle it for now.
Drawing the borders around nui gadgets is completed. This is done by drawing the border to a texture in the nui rendering pass, then drawing the texture to the display in the ng pass as usual. I tried drawing the border with drawing mode GL_LINE_LOOP, but that didn’t work as expected, seemingly adding an unwanted vertex at the origin (center) of the texture. GL_LINES gives a satisfactory result for now, but causes some visible disconnected pixels at the junctions between lines, so I’ll need to revisit later and figure out what I’m doing wrong with GL_LINE_LOOP.
I cleaned up the drawing paths significantly, so now all entities are using the same VBO model and vertex layout.
I installed awstats on this site to get more information about who might be reading.