Questions tagged [textout]

39 questions
10
votes
1 answer

Is it possible to determine the fonts Windows chooses for font-linking?

Suppose you have a string with text in two or more scripts. When you use a GDI function like TextOut, (modern versions of) Windows will do "font-linking". That is, GDI will draw what it can with your selected font and draw the rest in an…
Adrian McCarthy
  • 45,555
  • 16
  • 123
  • 175
8
votes
2 answers

Displaying String Output in a Window using C (in WIN32 API)

I want a proper way in which I can output a character string and display it on a Window created. I had been using textout() function, but since it only paints the window, once the window is minimized and restored back, the data displayed on the…
Ayse
  • 2,676
  • 10
  • 36
  • 61
5
votes
3 answers

Display of Asian characters (with Unicode): Difference in character spacing when presented in a RichEdit control compared with using ExtTextOut

This picture illustrates my predicament: All of the characters appear to be the same size, but the space between them is different when presented in a RichEdit control compared with when I use ExtTextOut. I would like to present the characters the…
Coder_Dan
  • 1,815
  • 3
  • 23
  • 31
4
votes
1 answer

Why TextOut in Canvas connects Box-Drawing Characters with a gap when I print them not sequentially in one statement?

I use the fonts "Consolas" and/or "Courier New" in a project to draw an MS-DOS-looking environment. In this project if I use TextOut (of the TCanvas) to print for Box Drawing characters sequentially in one statement, everything is fine, for example…
M Ahmadzadeh
  • 121
  • 7
4
votes
1 answer

How can I change the height of textOut of TCanvas?

I am drawing text on TCanvas using TextOut() but I want bigger fonts. What can I do?
Himadri
  • 2,922
  • 5
  • 32
  • 56
4
votes
3 answers

How to draw wavy underlines with Win32 TextOut

I'm working on a piece of code that basically draws text on the screen by multiple calls to TextOut. It's a C++ Win32 application, I'm using Visual Studio 2012. How can I draw wavy underlines in the way Word does when marking spelling mistakes,…
digory doo
  • 1,978
  • 2
  • 23
  • 37
2
votes
2 answers

Use TextOut() in WM_COMMAND

I'm trying to print a text in the WM_COMMAND case, because I need a text to be printed after a button was pushed. Here's the code I have: switch(msg) { default: return DefWindowProc(hwnd, msg, wParam, lParam); case WM_COMMAND: switch…
tgikf
  • 557
  • 4
  • 17
2
votes
1 answer

Unexpected offset when using WinApi.Windows.TextOut with escapement

I'm trying to draw text to a canvas using the winapi TextOut method. This works fairly well when escapement is 0, 900, 1800 or 2700, but with all other values I get an offset error ("jump"). Please run the attached code to see the problem. As you…
Svein Bringsli
  • 5,640
  • 7
  • 41
  • 73
2
votes
2 answers

Change the unit for setting position in TextOut, C++

I'm currently working on a printing plugin with C++, and starting working with TextOut to print the text I want. It works great, but apparently, the positions that TextOut uses as params are in pixels. Is there a way to set them to be in cm or mm?…
Enkindler
  • 33
  • 4
2
votes
1 answer

WinApi DrawText and TextOut cannot display unicode character U+5167

Hello Windows Programmers! I am new to windows programming using winapi. I was reading this very nice book and I encountered a problem(displayed as a black box) when I display unicode character U+5167 (內) in the client area using DrawText and…
wembikon
  • 91
  • 2
  • 9
2
votes
1 answer

How to limit text area by my window?

I out text but he climbed by region of my window, how I can fix it? Here part of my code PAINTSTRUCT ps; hdc=BeginPaint(hWnd3,&ps); LOGFONT lf; lf.lfWidth=0; lf.lfHeight=14; strcpy(lf.lfFaceName,"Times New Roman"); …
Oleh
  • 644
  • 11
  • 19
1
vote
0 answers

Win32 API rendering of Unicode chars, which are missing in font file

I am using Delphi IDE (XE2 or later, I use several of the recent versions). It is a Win32 API question (Windows 10) rather than a Pascal question. If I render on TCanvas and use the font Codename Coder, I miss the rendering of special Unicode chars:…
proed
  • 15
  • 2
1
vote
1 answer

EndPaint hooking to draw text to a DirectX window

I want to draw text to a DirectX game, so I've injected a DLL which hooks EndPaint. My logic was that since EndPaint is supposed to be the last step in the WM_PAINT operation, I could, in my hook, draw the text, and then call EndPaint myself. By…
user2058002
1
vote
1 answer

How to save numbers as text when exporting a pandas dataframe

I have a * .csv file, with data in a field of this type: 00123, 0145, 0004567, that is, with leading zeros (text type); the case ,,, is that I want to save them in another dataframe (after other calculations) ,, and I would like to keep those zeros;…
1
vote
1 answer

Delphi SetMapMode Inverts Text

I am working on a graphics application and have a number of objects with captions. To put the captions, I calculate an X, Y coordinate and call: Canvas.TextOut(XText, YText, FCaption); I decided to use a different mapping mode to make conversions…
Robatron
  • 83
  • 9
1
2 3