Questions tagged [directwrite]

DirectWrite is a text layout and glyph rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008 (with Platform Update installed). DirectWrite provides these features

DirectWrite is a text layout and glyph rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008 (with Platform Update installed). DirectWrite provides these features

  • A device-independent text layout system that improves text readability in documents and in UI.
  • High-quality, sub-pixel, ClearType text rendering that can use GDI, Direct2D, or application-specific rendering technology.
  • Hardware-accelerated text, when used with Direct2D.
  • Support for multi-format text.
  • Support for the advanced typography features of OpenType fonts.
  • Support for the layout and rendering of text in all supported languages.
  • GDI-compatible layout and rendering.
149 questions
1
vote
1 answer

What typography setting is enabling Arabic "end" contextual forms at the end of lines wrapped in the middle of a word?

The following is laid out using an IDWriteTextLayout with dimensions 250x100. It simply contains 150 of the Arabic letter U+062A, with no spaces, using Calibri 24 (normal weight/style/stretch). The blue box shows the 250x100 layout area (the text…
Jayonas
  • 401
  • 2
  • 12
1
vote
1 answer

IDWriteTextLayout doesn't trim Japanese word?

I followed an example here to trim texts using ellipsis sign: http://cx5software.sakura.ne.jp/blog/2011/01/18/directwrite-ellipsis-trimming-sign/ It works fine for English text, but it doesn't work for Japanese text. Does anyone know why ? Here is…
nikoniko
  • 833
  • 2
  • 11
  • 22
1
vote
2 answers

DirectWrite align text center

I am trying to align center the text I have to draw. I use ID2D1RenderTarget::DrawTextLayout method. The problemn is that if I set the text horizontal alignment to DWRITE_TEXT_ALIGNMENT_LEADING (the default value) the text is drawn proberly, but if…
Nick
  • 10,309
  • 21
  • 97
  • 201
1
vote
1 answer

IDWriteGdiInterop::CreateBitmapRenderTarget failing

I have an application which renders glyphs to a printer device context. Earlier, it used GDI and it worked fine. But now, I'm trying to use Directwrite instead. I've changed the existing ExtTextOut call and used IDWriteTextLayout::Draw function. I…
newuser
  • 105
  • 8
1
vote
1 answer

Direct2D: Convert text to path

I am very new to Direct2D and DirectWrite and still looking into the possibilities that these APIs provide. For a potential graphics applications I was wondering whether it is possible to render text as a path so that individual points can be…
1
vote
1 answer

Use of TABs in DirectWrite

I am just working my way through DirectWrite in C++ which appears to be solving my demands for having equal layouts in different render targets (screen and printer). I have closely inspected the HelloWorld sample…
PaulTheHacker
  • 179
  • 1
  • 8
1
vote
1 answer

Chrome 37 DirectWrite fixed text rendering, but special characters still appear grainy

Chrome 37 fixed its font rendering issues by supporting DirectWrite on Windows. As a result, text renders much better, as seen in a screenshot of my web app: However, note that the stars on the right remain ugly. The stars are ☆ WHITE STAR…
Keavon
  • 6,837
  • 9
  • 51
  • 79
1
vote
2 answers

DirectWrite RegisterFontFileLoader :create a font file loader and register it in Delphi without access violation

I am trying to register a DirectWrite (Windows 7, Windows 8) API based font file loader, and recreate in Delphi, the CustomFont demo from the Windows 7 SDK that shows how to use DirectWrite APIs with a custom font collection. This allows DirectWrite…
Warren P
  • 65,725
  • 40
  • 181
  • 316
1
vote
1 answer

Calculating width of unicode character in DirectWrite using GetDesignGlyphMetrics

I am working on a GDI to DirectWrite migration project. I want to calculate width of each unicode character , on GDI this is acomplished using GetCharWidth. On msdn blog i found that replacement for GetCharWidth of GDI is GetDesignGlyphMetrics . Can…
Chandan
  • 13
  • 3
1
vote
1 answer

RTL text width in DirectWrite

I use IDWriteTextAnalysisSink / AnalyzeScript to display mixed LTR (English) and RTL (Hebrew) text in DirectWrite (C++), and I compute text width from: textwidth = 0; for (UINT glyph=0; glyph
BanK
  • 73
  • 8
1
vote
2 answers

How can I get the DirectWrite PadWrite sample to work?

I'm trying to learn about the DirectWrite API so I can get a flexible solution to the problem of rendering text from any culture, and potentially use it to incorporate rich text editing into an application with a lot more control than the "canned"…
Daniel Earwicker
  • 114,894
  • 38
  • 205
  • 284
1
vote
2 answers

DirectWrite: How to get rendered bitmap data

Is there a way to get rendered bitmap image using DirectWrite and Direct2D ? Like FreeType2's FT_GlyphSlot->bitmap...
user2170124
  • 105
  • 2
  • 8
1
vote
0 answers

Capturing text in IE 9 with C++

I have a requirement to capture text from IE 9 (preferably the text currently shown and not the full HTML document). Previous versions of IE used TextOut and you can clearly see the text using an API monitor. Now that IE 9 uses…
Brent Campbell
  • 395
  • 1
  • 4
  • 12
1
vote
1 answer

How do I load a custom font from an embedded file into DirectWrite in a Metro app?

I have been fighting a losing battle against loading fonts from an embedded file for use with DirectWrite. I am writing a simple puzzle game that has a C#/XAML interface but also uses SurfaceImageSource to add some DirectX content. I have written…
petrsnd
  • 6,046
  • 5
  • 25
  • 34
0
votes
1 answer

Adjust letter/character spacing in DirectWrite

I'm using DirectWrite. How do I adjust overall letter spacing? I think I want the equivalent of SetTextCharacterExtra in GDI.
Chad W
  • 63
  • 1
  • 7