Display a grid of all character of a font
-
Hello I'm looking for some Csharp component to display all character of a selected font, allowing selection Charmap.exe is a good example It can be very usefull in order to select special character as Webdings, Windings, Symbols or cyrillic . etc Any idea ? Thanks for your help
-
Hello I'm looking for some Csharp component to display all character of a selected font, allowing selection Charmap.exe is a good example It can be very usefull in order to select special character as Webdings, Windings, Symbols or cyrillic . etc Any idea ? Thanks for your help
I would try a TextBox (set to multi-line) or a RichTextBox; insert the appropriate characters, and then set the font as required. Or you could use a whole bunch of Labels X| .
-
Hello I'm looking for some Csharp component to display all character of a selected font, allowing selection Charmap.exe is a good example It can be very usefull in order to select special character as Webdings, Windings, Symbols or cyrillic . etc Any idea ? Thanks for your help
Someone did a similar thing here (can't post the code, I'm afraid) by : For each char from 32 to 255 create a label with a border, width and height as appropriate, and the font set to the desired font, Text of the char.ToString(); The labels can then be positioned however you want for a pleasing display. On the click event of the label, it displays the same character in a label using the same font with an increased size, and on double-click it raises a 'CharacterSelected' event which pass back the font and character selected. Should be enough to get you started?
___________________________________________ .\\axxx (That's an 'M')
-
Someone did a similar thing here (can't post the code, I'm afraid) by : For each char from 32 to 255 create a label with a border, width and height as appropriate, and the font set to the desired font, Text of the char.ToString(); The labels can then be positioned however you want for a pleasing display. On the click event of the label, it displays the same character in a label using the same font with an increased size, and on double-click it raises a 'CharacterSelected' event which pass back the font and character selected. Should be enough to get you started?
___________________________________________ .\\axxx (That's an 'M')
Yeah, but how can one find out ALL the characters present in a specific font, without looping all Unicode char codes and measuring string width looking for non-zero? :)
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
-
Yeah, but how can one find out ALL the characters present in a specific font, without looping all Unicode char codes and measuring string width looking for non-zero? :)
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
-
not sure you need to - just display 'em - you'll get an empty box if they're not defined in that font.
___________________________________________ .\\axxx (That's an 'M')
I am not going to create a grid with ten thousands of cells, I want to know what characters are present without painting anything. :)
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
-
I am not going to create a grid with ten thousands of cells, I want to know what characters are present without painting anything. :)
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
-
Sorry - misread/misunderstood. Yep - you don't want to have a dialog popping up that you have to scroll forever to find used characters... just stick with 33 through 255 if you ask me!
___________________________________________ .\\axxx (That's an 'M')
-
Hello thanks for all reply I was lookin for an "out of the box" tool The solution to create 256 labels seems a liitle bit heavy Finaly maybe using a datagridview can be the right solution ??
Well, behind the scenes all a datagridview is going to do is to create the labels for you, so I'm not sure why you think it's a bit heavy - it also gives you complete control over your presentation. I reckon you could knock up the code in 1/2 day easy - then publish it as an article on CP for the glory of it
.\\axxx