Masm32 SDK description, downloads and other helpful linksMessage to All Guests
Started by Biterider, May 07, 2020, 06:34:09 PM
Quote from: Biterider on March 13, 2021, 06:05:26 PMHiThis is a TextView implementation of simple zoomable controls.The technique used is a combination of active areas and text callbacks. The latter was implemented in the most recent incarnation of this component.When a mouse or touch interaction is detected in an active area, the implementation of the control responds by setting the appropriate text using the text callback. In the case of the radio button or check box, Unicode characters of the same width have been used to leave the rest of the text unchanged. This way, no recalculation is required, which saves processing time. The only requirement is that the fonts used are installed on the host system. I used "Lucida Sans Unicode" and "Wingdings" which should be included with every Windows installation.This is a solution for situations where simple interaction is required in a text-based context. The bonus point is that since it's text based, it's also zoomable, as seen in the attached demo.Have fun!Biterider
Quote from: Biterider on March 19, 2021, 08:42:50 AMHi LiaoMiThanks for your feedback. I have a guess as to what is happening here. The selected characters for the checkboxes are 00A3 and 0052 of "Wingdings 2" font. The former (unchecked checkbox) is used to calculate character width. I see on the "Option 4" line a character that is used when the rendering fails. This smaller character reduces the space for the checked checkbox and that is what we see.Can you check that you have this font installed and what these characters look like when using for instance the option "insert symbols" of MS-Word?To find out what happens, I can prepare a binary to display the renderable characters of that font.Thank you for your support.Biterider
QuoteWhich OS are you using?
Quote from: Biterider on March 21, 2021, 06:40:56 PMHiThis is an interesting problem. I started testing some other rendering APIs like TextOut and ExTextOut. They solved this problem with Wingdings 2, but introduced some new issues using fonts that behave fine with DrawText or DrawTextEx. In addition, TextOut requires kerning handling, which DrawText does automatically.I've read some information and documentation on the internet, but it seems that there is no one-size-fits-all solution. @fearless: your solution seems to be the most promising, but what puzzles me is that LiaoMi and I have the same font ("Wingdings 2", version 1.55), the same operating system and the same binary file and the result is very different.I wonder if applications like MS-Word use their own rendering algorithms. I guess so...Biterider