Solved

Getting a font in any language

Posted on 2004-08-17
3
176 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

821 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