Solved

Getting a font in any language

Posted on 2004-08-17
3
171 Views
Last Modified: 2013-12-03
Hi all,

I have an MFC application that takes a defualt font from the window's DC.
I do that in the hope that this font is a valid font and has all the attributes needed of the local system that the App is running on. I get the LOGFONT from this font and then I create my own fonts with different heights.

I then use this font to display ascii/ansi strings in that local language in that window.
If the system that the app is running on has set the local setting right the ascii/ansi string should be views correctly.

This worked for me so far with many languages.

I have a problem with fonts in japanese. For some strange reason when try it on a Windows 2000 System with Japanese as loacl setting I get a font that no metter what i can not change it's height. I call CreatePointFontIndirect() and each time i get the same font (with the same wrong height)

What am i doing wrong ?
What font (or LOGFONT) can I use that will work in any language?

I'm trying to find a defualt font that will work in any laguage and I can chage it's height.
0
Comment
Question by:kobrigo
3 Comments
 
LVL 1

Accepted Solution

by:
aorenste32 earned 500 total points
ID: 11821795
The specific problem is that most likely that you're getting a raster font (which doesn't have scaling information) and PROOF_QUALITY is set (which means that quality is more important than scaling).

I would try setting the new LOGFONTs as follows:
(zero out the structure first)
lfHeight = the new height
lfWeight = FW_NORMAL
lfCharSet = charset from default font
lfOutPrecision = OUT_TT_ONLY_PRECIS

This should give you a font which has the same charset, but requires a true-type (scalable) font.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Exchange and Third Party application. 8 60
Excel object stays open 19 65
wordlen challenge 3 49
Currency Conversion? 1 39
A short article about a problem I had getting the GPS LocationListener working.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now