Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

How do I embed and then use a font inside a WPF web application?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 03-16-2006   #1 (permalink)
Philippe Lavoie
Guest


 

How do I embed and then use a font inside a WPF web application?

Hi

I'd like to embed a barcode font,
http://www.squaregear.net/fonts/free3of9.shtml

and then use it inside my application.

I'm marking the font as a resource then I try to use it as follows

<Glyphs x:Name="BarCodeInfo" UnicodeString="*1223123*"
FontUri="pack://application:,,,/Images\FREE3OF9.TTF"
FontRenderingEmSize="12"/>


Needless to say that the above doesn't seem to product much results...

Please help me out, there doesn't seem to be many examples of this on
the web.

Phil

My System SpecsSystem Spec
Old 03-20-2006   #2 (permalink)
Chris Han [MSFT]
Guest


 

RE: How do I embed and then use a font inside a WPF web application?

Hi Philippe,
Here's a link to the SDK article which describes how to do this:
http://windowssdk.msdn.microsoft.com/library/

I noticed you used Glyphs, this is a low level API, would TextBlock work
better for your scenario?

Thanks,
Chris

"Philippe Lavoie" wrote:

> Hi
>
> I'd like to embed a barcode font,
> http://www.squaregear.net/fonts/free3of9.shtml
>
> and then use it inside my application.
>
> I'm marking the font as a resource then I try to use it as follows
>
> <Glyphs x:Name="BarCodeInfo" UnicodeString="*1223123*"
> FontUri="pack://application:,,,/Images\FREE3OF9.TTF"
> FontRenderingEmSize="12"/>
>
>
> Needless to say that the above doesn't seem to product much results...
>
> Please help me out, there doesn't seem to be many examples of this on
> the web.
>
> Phil
>

My System SpecsSystem Spec
Old 03-20-2006   #3 (permalink)
Philippe Lavoie
Guest


 

Re: How do I embed and then use a font inside a WPF web application?

I think you truncated the link

And I do not care about Glyphs that much. However, TextBlock only had a
'Font-Family' property, which isn't an URI. I assumed, I couldn't use
one embedded inside the application.

Phil

Chris Han [MSFT] wrote:
> Hi Philippe,
> Here's a link to the SDK article which describes how to do this:
> http://windowssdk.msdn.microsoft.com/library/
>
> I noticed you used Glyphs, this is a low level API, would TextBlock work
> better for your scenario?
>
> Thanks,
> Chris
>
> "Philippe Lavoie" wrote:
>
>
>>Hi
>>
>>I'd like to embed a barcode font,
>>http://www.squaregear.net/fonts/free3of9.shtml
>>
>>and then use it inside my application.
>>
>>I'm marking the font as a resource then I try to use it as follows
>>
>><Glyphs x:Name="BarCodeInfo" UnicodeString="*1223123*"
>>FontUri="pack://application:,,,/Images\FREE3OF9.TTF"
>>FontRenderingEmSize="12"/>
>>
>>
>>Needless to say that the above doesn't seem to product much results...
>>
>>Please help me out, there doesn't seem to be many examples of this on
>>the web.
>>
>>Phil
>>

My System SpecsSystem Spec
Old 03-21-2006   #4 (permalink)
Chris Han [MSFT]
Guest


 

Re: How do I embed and then use a font inside a WPF web applicatio

Yes you can actually use relative uris with FontFamily, but you have to
specify a '#' to indicate where the uri ends and where the font family begins:
FontFamily="/Fonts/#Cool Font"

Sorry for truncating...
http://windowssdk.msdn.microsoft.com...4460865286.asp

That should work if not it's under
WPF-->Documents-->Typography-->Fonts-->Packaging Fonts

hope that helps philippe,
Chris

"Philippe Lavoie" wrote:

> I think you truncated the link
>
> And I do not care about Glyphs that much. However, TextBlock only had a
> 'Font-Family' property, which isn't an URI. I assumed, I couldn't use
> one embedded inside the application.
>
> Phil
>
> Chris Han [MSFT] wrote:
> > Hi Philippe,
> > Here's a link to the SDK article which describes how to do this:
> > http://windowssdk.msdn.microsoft.com/library/
> >
> > I noticed you used Glyphs, this is a low level API, would TextBlock work
> > better for your scenario?
> >
> > Thanks,
> > Chris
> >
> > "Philippe Lavoie" wrote:
> >
> >
> >>Hi
> >>
> >>I'd like to embed a barcode font,
> >>http://www.squaregear.net/fonts/free3of9.shtml
> >>
> >>and then use it inside my application.
> >>
> >>I'm marking the font as a resource then I try to use it as follows
> >>
> >><Glyphs x:Name="BarCodeInfo" UnicodeString="*1223123*"
> >>FontUri="pack://application:,,,/Images\FREE3OF9.TTF"
> >>FontRenderingEmSize="12"/>
> >>
> >>
> >>Needless to say that the above doesn't seem to product much results...
> >>
> >>Please help me out, there doesn't seem to be many examples of this on
> >>the web.
> >>
> >>Phil
> >>

>

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
drag and drop inside application amarnath Vista General 7 03-02-2008 05:45 PM
change permission on all files inside a folder or hundreds of file inside a folder Anthony B Vista security 2 12-28-2007 04:26 AM
get whole session output from inside C# application lazaropi PowerShell 1 07-03-2007 11:22 AM
How to embed the ETS within a SnapIn? Joannes Vermorel PowerShell 1 11-08-2006 03:56 PM
Trouble With Search application inside vista James Vista file management 4 06-07-2006 05:55 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51