|I wrote an app in Win Forms, and I'm using a circle in ListView, as a pleasant indicator. On my rigs, running Win 10 at home and 11 at the office, the ⬤ char works no problem. But on the customers computers running Win 7, I get the tall square symbol.
So I changed the Font in my Win Forms App to Segoe UI, which looks nice, but I still get the tall rectangle. I checked the customers computers to see what fonts are loaded, and Segoe UI is there.
Then I did research, and a few online posts talk about font searching by the OS, which dates back to Windows XP. If the Char ⬤ doesn't exists in the Font file, the OS will search for that char in other font files, such as webdings.ttf. Found a post about using the RegEdit /LocalMachine/Software/WindowsNt/Fonts and having to edit font mappings, which looked complicated.
ChatGpt says that I can MeasureText, to see if a char exists, and if not choose another char sysmbol.But the char always exists.
Dim font As New Font("Segoe UI", 9, FontStyle.Regular)
' The character you want to check (e.g., the copyright symbol ©)
Dim specialChar As Char = "⬤"
' Check if the font can display the character
Dim canDisplayChar As Boolean = TextRenderer.MeasureText(specialChar, font).Width > 0
If canDisplayChar Then
I'm just wondering if someone here has figured this out, and can share what they did. The customer really wants the ⬤.
On a side note or question, I can set a color for the circle in ListView on .Net Core 7, but can't set the color of the circle in .Net Framework 4.6.1.
If it ain't broke don't fix it
Discover my world at jkirkerx.com