Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting a font in any language

Posted on 2004-08-17
3
Medium Priority
?
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
aorenste32 earned 2000 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
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…
Simple Linear Regression

705 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