468,507 Members | 1,558 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,507 developers. It's quick & easy.

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

How can I access these unicode symbols & show them thru my application.
Thanks.

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

William Cruz

*** Sent via Developersdex http://www.developersdex.com ***
Dec 27 '05 #1
9 2008
"William Cruz" <wc*****@msn.com> schrieb:
How can I access these unicode symbols & show them thru my application.
Thanks.

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

You'll have to use a TrueType or OpenType font which contains glyphs for the
characters. After assigning the font to the control you can use the
characters in its caption.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 27 '05 #2
On Tue, 27 Dec 2005 06:10:50 -0800, William Cruz <wc*****@msn.com>
wrote:
How can I access these unicode symbols & show them thru my application.
Thanks.

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

William Cruz

*** Sent via Developersdex http://www.developersdex.com ***


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/math...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

Dec 27 '05 #3
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
"William Cruz" <wc*****@msn.com> wrote in message
news:OO*************@tk2msftngp13.phx.gbl...
| How can I access these unicode symbols & show them thru my application.
| Thanks.
|
| http://www.unicode.org/charts/PDF/U2200.pdf
|
|
|
| William Cruz
|
| *** Sent via Developersdex http://www.developersdex.com ***
Dec 28 '05 #4
On Tue, 27 Dec 2005 20:23:31 -0600, "Jay B. Harlow [MVP - Outlook]"
<Ja************@tsbradley.net> wrote:
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

Dec 28 '05 #5
I copied the code you provided & I still get an empty square when I call
the characters.

William Cruz

*** Sent via Developersdex http://www.developersdex.com ***
Dec 28 '05 #6
On Wed, 28 Dec 2005 04:41:50 -0800, William Cruz <wc*****@msn.com>
wrote:
I copied the code you provided & I still get an empty square when I call
the characters.

William Cruz

*** Sent via Developersdex http://www.developersdex.com ***


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


Dec 28 '05 #7
This works beautifully. Thanks :)

William Cruz

*** Sent via Developersdex http://www.developersdex.com ***
Dec 28 '05 #8
| 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
news:2s********************************@4ax.com...
| On Tue, 27 Dec 2005 20:23:31 -0600, "Jay B. Harlow [MVP - Outlook]"
| <Ja************@tsbradley.net> wrote:
|
| >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
|
|
|
Dec 28 '05 #9
On Wed, 28 Dec 2005 09:57:49 -0600, "Jay B. Harlow [MVP - Outlook]"
<Ja************@tsbradley.net> wrote:
| 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

Dec 28 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Noixe | last post: by
11 posts views Thread by Patrick Van Esch | last post: by
3 posts views Thread by dalei | last post: by
2 posts views Thread by Quimbly | last post: by
3 posts views Thread by gieforce | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.