Windows: Getting glyph outlines for substitution characters from other fonts?

Found out what I needed to know myself: The IMLangFontLink interface especially the MapFont method contain the needed functionality to find out which substitution fonts should be used on windows.

Up vote 1 down vote favorite share g+ share fb share tw.

I need to render fonts into a 3d game world, so I use the GetGlyphOutline outline function to get the glyph shapes to render into a texture. However, I want to be able to handle the case where characters are not present in the given font (as is often the case for asian other other international text). Windows text rendering will automatically substitute fonts which have the needed characters.

But GetGlyphOutline will not. How can I detect this case, and get the outlines for the substituted glyphs? Mac OS X Core Text has a function to get a matching substitution font for a given font and a string - is there anything similar on windows?

Windows fonts gdi+ true-type-fonts glyph link|improve this question asked Dec 1 '09 at 12:23jonas echterhoff665.

Found out what I needed to know myself: The IMLangFontLink interface, especially the MapFont method contain the needed functionality to find out which substitution fonts should be used on windows.

– epotter Dec 2 '09 at 16:19 As far as I could tell, it gets installed by Internet Explorer 4.0 or higher. I don't know if it's safe to presume that it is on any windows system, even if IE has been removed or not. – jonas echterhoff Dec 2 '09 at 16:37.

I too have puzzled with GetGlyphOutline. I'm not sure if you were able to do the same, but I was able to get mixed-script text outlines by using TextOut() in combination with BeginPath(), EndPath() and GetPath(). For example, even with the Arial font, I am able to get the path of the Japanese text?

(using C++, but can easily be done in C as well): SelectObject(hdc, hArialFont); BeginPath(hdc); TextOut(hdc, 100, 100, L"\u30c6\u30b9\u30c8"); // auto font subbing EndPath(hdc); // get number of points in path int pc = GetPath(hdc, NULL, NULL, 0); if (pc > 0) { std::vector points(pc); std::vector types(pc); // PT_MOVETO, PT_LINETO, PT_BEZIERTO GetPath(hdc, &points0, &types0, pc); // it seems the first four points are the bounding rect // subsequent points match up to their types for (int I = 4; I.

– jonas echterhoff Jan 20 '11 at 10:31 @jonas: It all depends on the device context you are drawing on (and how it is configured). Also if you use LineTo within BeginPath and EndPath then nothing is drawn until you use StrokePath or EndPath. Also this was just demonstrating that you could obtain the path, once you have the path you can extrude it into a 3D object or draw it on the screen.

– dreamlax Jan 20 '11 at 10:45.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions