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
3
votes
2 answers

How to create IDWriteTextFormat from IDWriteFontFace

I'm creating W8 C++/CX DirectX application and I'm trying to use custom font file from application own storage. I figure out how to use IDWriteFactory::CreateFontFileReference to load IDWriteFontFile from directory and then how to create…
2
votes
1 answer

How to access DirectWrite inherited interfaces in C++?

I am using C++ to work with DirectWrite but I cannot seem to figure out how to use methods that are in inherited interfaces. For example, the " GetUnicodeRanges" method/function in the IDwriteFont1 interface. The IDWriteFont1 interface/object is not…
RDan
  • 25
  • 5
2
votes
0 answers

How to improve DirectWrite performance when rendering lots of text?

I'm working on an application that renders lots of text (~350 lines with ~100 characters per line, possibly each frame). I find that DirectWrite takes way too long to layout these text, and the frame rate drops to 8-10 FPS. I've already chopped the…
Luke Zhou
  • 125
  • 2
  • 10
2
votes
1 answer

Vertical Text with DirectWrite (+270° rotated)

I need to show vertical text in my direct2d application. Following text formatting code rotates the text…
Liton
  • 1,398
  • 2
  • 14
  • 27
2
votes
1 answer

Using font files from local disk

I'm developing a UWP app with C# to preview font files from the user's local disk. I'm using SharpDX libraries to read the .ttf file content and query the different font properties. My question is: How can I set a TextBlock FontFamily to the loaded…
Leisvan
  • 105
  • 1
  • 7
2
votes
1 answer

Drawing a TImageList glyph to a TDirect2DCanvas

I'm currently about to replace the drawing code for an old component from GDI + UniScribe to Direct2D and DirectWrite (the successors). So far the transition was straight forward as most of the time all I need to do was to replace calls to the…
CWBudde
  • 1,783
  • 1
  • 24
  • 28
2
votes
0 answers

I am getting a different font height from DirectWrite font text metric than I requested as the height parameter

Can anyone explain this? Code below: // - change font size to specified point(pt) size. // - returns false if there is an error, or true otherwise. bool GraphicsDirect2D::TextSetFontSize(int size) { if (size <= 0) { assert(0 && "Error:…
Andy Good
  • 37
  • 3
2
votes
1 answer

How to draw text with the default UI font in DirectWrite?

The CreateTextFormat method expects a fontFamilyName parameter. How do I create an IDWriteTextFormat that uses the default UI font?
eyelash
  • 3,197
  • 25
  • 33
2
votes
0 answers

DirectWrite: possible memory leak when using IDWriteTextLayout::GetMetrics

It seems that IDWriteTextLayout::GetMetrics increments COM reference counter inside IDWriteFactory by 2 but IDWriteTextLayout object doesn't decrement it at all upon destruction. As a result IDWriteFactory object isn't destroyed. Am I right that…
geniuss99
  • 101
  • 5
2
votes
2 answers

What are the default typography settings used by IDWriteTextLayout?

I would like to disable ligatures, which appear to be enabled by default, at least in the fonts that I'm using (i.e. Calibri). It appears that the way to do this is to use IDWriteTextLayout::SetTypography to set an IDWriteTypography object to the…
Jayonas
  • 401
  • 2
  • 12
2
votes
1 answer

Changing DWriteMeasuringMode for DrawTextLayout

I am currently drawing text in DirectWrite using DrawText. On my switch to DrawTextLayout i noticed that the rendering of aliased letters isn't done nicely. Is there a way to change the measurement mode like we can do in DrawText to…
Sawyer
  • 31
  • 2
2
votes
2 answers

Chrome 35 DirectWrite (on by default) breaks my site menu

Just updated to the latest Chrome 35 Stable, and noticed that the fonts are smoother - great, they've turned implemented DirectWrite. Lovely stuff. However, it seems to break on my site. I have the following markup for the main menu (very…
Mike Rockétt
  • 8,947
  • 4
  • 45
  • 81
2
votes
2 answers

DirectWrite: Use Different Font for Latin and Complex Script

I use CreateTextLayout and CreateTextFormat to draw text with DirectWrite (C++), the text is mixed Hebrew/English, is there a way to use a different font/font size for the Latin and Hebrew characters? Thanks.
BanK
  • 73
  • 8
2
votes
2 answers

IDWriteTextLayout issue with italic text

Does anyone know of a way to get IDWriteTextLayout to adjust the layout so that glyphs will not overhang the layout boundaries? This is particularly an issue with italics such as 'f' under some fonts when aligned to the LHS or RHS. GDI+ by default…
johnny209
  • 21
  • 2
2
votes
1 answer

IDWriteTextFormat::SetTextAlignment does not work for DWRITE_TEXT_ALIGNMENT_JUSTIFIED

IDWriteTextFormat::SetTextAlignment was used to alignment text in DirectWrite, it takes a parameter of DWRITE_TEXT_ALIGNMENT type enum DWRITE_TEXT_ALIGNMENT { DWRITE_TEXT_ALIGNMENT_LEADING, DWRITE_TEXT_ALIGNMENT_TRAILING, …
zdd
  • 8,258
  • 8
  • 46
  • 75
1 2
3
9 10