Solved

Getting a font in any language

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This is about my first experience with programming Arduino.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Progress

624 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