How do I get access to these Unicode symbols thru VB.

  • Thread starter Thread starter William Cruz
  • Start date Start date
How can I access these unicode symbols & show them thru my application.
Thanks.

http://www.unicode.org/charts/PDF/U2200.pdf



William Cruz

A good start would be getting a font supporting the 2200-22FF range
of Unicode characters.

A good resource would be
http://www.alanwood.net/unicode/fonts.html

or more precisely
http://www.alanwood.net/unicode/fontsbyrange.html#u2200

And some links on this page
http://www.alanwood.net/unicode/mathematical_operators.html
"To see exactly which characters are included in a particular font,
you can use a utility such as Andrew Wests BabelMap, Bjondis
Character Agent, Apples TrueEdit, or WunderMoosens FontChecker."

When you have assigned an appropriate font containing the
required glyphs, the characters should be displayed just like any
other characters.

/JB
 
William,
In addition to the other comments.

Some windows applications (Word/Office 2000 & 2002) will install "Arial
Unicode MS" which contains all Unicode 2.1 glyphs:

http://www.alanwood.net/unicode/fonts.html
http://support.microsoft.com/kb/q287247/

Once you have a font with the glyphs you want.

I Normally within my code I define Char constants for the Unicode characters
I need:

Const ForAll As Char = ChrW(&H2200)
Const Complement As Char = ChrW(&H2201)
Const PartialDifferential As Char = ChrW(&H2202)

Then I can simply use the constants in my code:

Private Sub MainForm_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Const formula As String = ForAll & Complement & PartialDifferential
Label1.Text = formula
End Sub


--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


| How can I access these unicode symbols & show them thru my application.
| Thanks.
|
| http://www.unicode.org/charts/PDF/U2200.pdf
|
|
|
| William Cruz
|
|
 
William,
In addition to the other comments.

Some windows applications (Word/Office 2000 & 2002) will install "Arial
Unicode MS" which contains all Unicode 2.1 glyphs:

That is a 23MB OpenFont file which compresses to 15MB.
Far more glyphs than the original poster actually needed.

The font, as far as I understand it, is not redistributable either(?)

Question: What is the memory footprint of using such a font?
23MB? 23MB + the characters used during the application session?
Just the space required by the characters used during the application
session? Anybody knows or has tested this?

/JB
 
I copied the code you provided & I still get an empty square when I call
the characters.

William Cruz
 
I copied the code you provided & I still get an empty square when I call
the characters.

William Cruz

Put a vertical scrollbar and a label on an empty form and paste
the following code:

---snip---
Private Sub VScrollBar1_ValueChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles VScrollBar1.ValueChanged
Dim f As Font = New Font("Arial Unicode MS", 72)
Dim g As Graphics = Me.CreateGraphics
g.Clear(Me.BackColor)
g.DrawString(ChrW(VScrollBar1.Value), f, New
SolidBrush(Me.ForeColor), 100, 100)
f.Dispose()
g.Dispose()

Label1.Text = VScrollBar1.Value.ToString("X4")

End Sub
---snip---

The 2200-22FF (hex) range IS included in Arial Unicode MS.

This works fine for me:

---snip---
Label1.Font = New Font("Arial Unicode MS", 10)
Label1.Text = ChrW(&H2200)
---snip---

Did you forget the "&H"? 2200 (decimal) is not in the font,
but &H2200 (hex) is.

/JB
 
| That is a 23MB OpenFont file which compresses to 15MB.
| Far more glyphs than the original poster actually needed.
I did say "all Unicode 2.1 glyphs", if the OP is in an environment (such as
a corporation) that has Office 2000 or 2002, then I would consider the font
"usable", outside a corporate environment its probably not as usable...

| The font, as far as I understand it, is not redistributable either(?)
That's my understanding also. I use it primarily to see what the various
code points in Unicode are via the "Start - All Programs - Accessories -
System Tools - Character Map".

| Question: What is the memory footprint of using such a font?
Not sure. I would expect the font itself and/or individual glyphs to be
loaded and/or cached as a shared resource in GDI and/or GDI+ itself & not
directly impact the memory footprint of my app. However I don't know how the
GDI/GDI+ subsystem manages memory...


--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


"Joergen Bech @ post1.tele.dk>" <jbech<NOSPAMNOSPAM> wrote in message
| On Tue, 27 Dec 2005 20:23:31 -0600, "Jay B. Harlow [MVP - Outlook]"
|
| >William,
| >In addition to the other comments.
| >
| >Some windows applications (Word/Office 2000 & 2002) will install "Arial
| >Unicode MS" which contains all Unicode 2.1 glyphs:
|
| That is a 23MB OpenFont file which compresses to 15MB.
| Far more glyphs than the original poster actually needed.
|
| The font, as far as I understand it, is not redistributable either(?)
|
| Question: What is the memory footprint of using such a font?
| 23MB? 23MB + the characters used during the application session?
| Just the space required by the characters used during the application
| session? Anybody knows or has tested this?
|
| /JB
|
|
|
 
| That is a 23MB OpenFont file which compresses to 15MB.
| Far more glyphs than the original poster actually needed.
I did say "all Unicode 2.1 glyphs", if the OP is in an environment (such as
a corporation) that has Office 2000 or 2002, then I would consider the font
"usable", outside a corporate environment its probably not as usable...

Of course. I was merely shocked to see this behemoth in my fonts
folder. None of the other fonts go above 500K.
| Question: What is the memory footprint of using such a font?
Not sure. I would expect the font itself and/or individual glyphs to be
loaded and/or cached as a shared resource in GDI and/or GDI+ itself & not
directly impact the memory footprint of my app. However I don't know how the
GDI/GDI+ subsystem manages memory...

I did some checking. Cannot find a direct link between my test program
and this font - or see that the program uses any more memory than any
other small test program. Must be cached somewhere. Ah, never mind.

What I *did* notice was that if I try to create a new font but spell
the font name wrong in the constructor (or the font is missing), I do
not get an exception or any other indication that something is wrong.
just an "MS Sans Serif" font?

Quick question: Is there a simple, one-line way of checking if a
font with a specific name (such as "Arial Unicode MS" is installed
without looping through System.Drawing.Text.InstalledFontCollection?

There is an .Exists function on that collection, but I am not sure
what to pass to it. Or if that is what I should be using.

TIA,

Joergen Bech
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top