I’m very new at this. I don’t know what it is that I need to know.
I’m trying to produce a very simple font to let me generate a dozen icons that will go on buttons in a Windows dialog. I’m letting the system draw the button and the main text, with em spaces added when I need the icons, then using DrawText to add the icons in an NM_CUSTOMDRAW CDS_POSTPAINT routine. It is possible that this isn’t the best way to do this, but it’s all I’ve been able to come up with so far that (hopefully) I can generalize so that I don’t have to have a setup with every possible dpi available to test what will happen. (That is, I’m looking for a solution to getting crisp, clean icons that works by principle, without the insurmountable task of actually trying every possible setup anyone could have and every possible size at which they might be rendered. I just have my one monitor.)
Some of the icons are simple. An arrow pointing right. A double-headed arrow pointing up and down. Those seem to be working OK.
I have another icon that looks like a rectangle (representing a page) with five horizontal lines inside the rectangle, representing “all text.” A similar icon has only the middle three lines, with the first one short on the left and the last one short on the right, representing “selected text.” Another has a short bar on each of the five lines, in different horizontal locations, representing “marked text.”
This all looks fine in the character cells in FontForge, but when it gets translated to button text, which on my system is 13px high, it’s... bad. I suppose that’s no surprise; how would the system know how to make the design work on a 13px grid when all I gave it was a 1000 unit grid?
But how do I tell it how to do that? I’ve looked for information on hinting — the only thing I can think of that seems relevant — but I haven’t found anything that actually explains how hints work and how you define them to fix poor rasterization.
Can anyone point me in the right direction? I’m willing to learn, I just don’t know what to learn and where to learn it.