473,767 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Font question

I'm using a particular font (for credit card symbols) within a crystal
report which looks fine when I preview, however when I run the report with
real data, the font is now shown correctly. It seems to revert back to a
standard font and displays letters instead of card symbols. Any ideas.?
Can I embed a font or include one in my VB app.?

Thanks
Dec 21 '05 #1
3 1492
Hi,

How to embed a font
http://www.bobpowell.net/embedfonts.htm

Ken
------------------------

"Chubbly Geezer" wrote:
I'm using a particular font (for credit card symbols) within a crystal
report which looks fine when I preview, however when I run the report with
real data, the font is now shown correctly. It seems to revert back to a
standard font and displays letters instead of card symbols. Any ideas.?
Can I embed a font or include one in my VB app.?

Thanks

Dec 21 '05 #2
Thanks Ken

not quite working correctly however.

Am using the following code:
-----
Imports System.Runtime. InteropServices

Imports System.IO

Imports System.Drawing. Text

Private Sub frmCrystalViewe r_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Try

Dim pfc As New PrivateFontColl ection()

'load the resource

Dim fontStream As Stream =
Me.GetType().As sembly.GetManif estResourceStre am("WARCSubscri ptionsLetterGen erator.TRPI____ .PFB")

'create an unsafe memory block for the data

Dim data As System.IntPtr = Marshal.AllocCo TaskMem(fontStr eam.Length)

'create a buffer to read in to

Dim fontdata() As Byte

ReDim fontdata(fontSt ream.Length)

'fetch the font program from the resource

fontStream.Read (fontdata, 0, fontStream.Leng th)

'copy the bytes to the unsafe memory block

Marshal.Copy(fo ntdata, 0, data, fontStream.Leng th)

'pass the font to the font collection

pfc.AddMemoryFo nt(data, fontStream.Leng th)

'close the resource stream

fontStream.Clos e()

'free the unsafe memory

Marshal.FreeCoT askMem(data)

Catch objE As Exception

MessageBox.Show (objE.Message)

End Try

End Sub

-----

I am using an Adobe *.PFB font as shown above.

The code error on

pfc.AddMemoryFo nt(data, fontStream.Leng th)

with a 'File Not Found' message.

I am running this code on the form_load of a form that contains a crystal
report viewer and the font in question is within my crystal report. Am
assuming that as long as the font is held in memory, where ever I view the
font should display correctly.

Thx

Chubbly

"Ken Tucker [MVP]" <Ke**********@d iscussions.micr osoft.com> wrote in message
news:D9******** *************** ***********@mic rosoft.com...
Hi,

How to embed a font
http://www.bobpowell.net/embedfonts.htm

Ken
------------------------

"Chubbly Geezer" wrote:
I'm using a particular font (for credit card symbols) within a crystal
report which looks fine when I preview, however when I run the report
with
real data, the font is now shown correctly. It seems to revert back to a
standard font and displays letters instead of card symbols. Any ideas.?
Can I embed a font or include one in my VB app.?

Thanks

Dec 22 '05 #3
For such a Crystal report related question, you may get support from:

http://support.businessobjects.com

Luke

Dec 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
7664
by: Martin Ernst | last post by:
Hello! I wonder which font is normally used in IE (6) for windows if i use "sans-serif" as font-family. Does anybody know it? Thanks Martin
133
6606
by: Philipp Lenssen | last post by:
Why is there no standardized and well-working way for a web-page to offer the font for download/embed it, in order to be displayed on the page? No matter what you think of the preferred font of a designer, many web-sites offer an image of the text instead to "force" this font -- which certainly can't be the solution (it's a bit of a hassle to maintain and create).
131
21685
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately get some good real world examples. Fire away! :) Regards, Peter Foti
4
16722
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go, then a generic element's font will do OK, too. What's the correct way to do this, please (so that it will also work for IE 6)? The motivation for this is that I have some text on the screen and I want to insert a textarea element between the...
10
4050
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out the web page in question... http://clientserver.home.comcast.net/unicode.html If you examine, for a few examples, characters such as square root (&amp;#8730;), prime (&amp;#8242;) and double prime (&amp;#8243;).
9
3778
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with body like <br><br> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1>
9
19533
by: Adam | last post by:
Can someone please help!! I am trying to figure out what a font is? Assume I am working with a fixed font say Courier 10 point font Question 1: What does this mean 10 point font Question 2: How do I determine how many characters I can get on a line Question 3: How do I determine how many lines I can get on a page. Assume no margins Question 4: Does their exist some kind of refernce table that will equate a font with chars/line and...
0
3050
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly (through a dialog). It works fine fo W98, 2000, NT, and XP is the theme is Classic. But on XP if the theme is "Windows XP", the we have a problem: if the developer set the caption font to be say, "Script" (and all non-default font), then the...
71
5801
by: Mark | last post by:
Sorry if the question is a bit basic. I generally express my font sizes in pixels, originally to handle the Macintosh/Windows font size differences (though I believe that they both now treat points the same way, at least within the browser window). It has been suggested that one should use ems to allow browsers to increase or decrease the text size. However, I have never had trouble with pixels.
14
2829
by: Roedy Green | last post by:
Is there a shortcut way to define the default font family (and characteristics) to be applied to all styles? -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
0
9405
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10013
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9960
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8838
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5280
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3930
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2807
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.