Solved

Getting a font in any language

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

734 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