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
0 answers

IE9 / Firefox 4+ (DirectWrite) line height inconsistency with older GDI browsers

Ok this is a difficult problem to solve: I have a site design which is badly affected by differing line heights between browsers that use DirectWrite vs GDI to render fonts. This is resulting in background images to be misaligned in IE9 and FF4+…
Leo
  • 105
  • 1
  • 7
1
vote
0 answers

DirectWrite renders issues and metric scaling inaccuracy

I have DirectWrite setup to render single glyphs and then shape them programmatically based on the glyph run and font metrics. (Due to my use case, I can't store every full texture in an OpenGL texture otherwise it's essentially a memory leak. So we…
Charlie
  • 680
  • 4
  • 11
1
vote
1 answer

Enumerate Stylistic Sets of an OpenType Font

In DirectWrite there's an IDWriteTypography which has an "AddFontFeature" member. This function allows setting a stylistic style based on this list. It's demonstrated by MSDN here. Adding, for example, DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 to…
Michael Chourdakis
  • 10,345
  • 3
  • 42
  • 78
1
vote
1 answer

DirectWrite: IDWriteFontFamily::GetFontCount

When I try to get the count of fonts in a font family by using DirectWrite, I get the wrong result. For example, when I look at the system font folder, Arial font family has 9 fonts but, GetFontCount returns 14. What is that surplus number 5? How…
jtxkopt
  • 916
  • 1
  • 8
  • 21
1
vote
1 answer

Calculate font "size" in DIPs of a system font

I have few BS_OWNERDRAWN buttons and using Direct2D and Direct Write to draw them. I also need to draw button text within button rectangle, for this I use IDWriteTextFormat which requires to specify "font size" in DIPs (device independent pixels). I…
metablaster
  • 1,958
  • 12
  • 26
1
vote
1 answer

How to get the IDWriteFont object from the font file downloaded in windows OS and not installed yet

Hi I am using DWrite APIs to get the system fonts metadata using DWrite APIs. I am doing the following. HR(DWriteCreateFactory( DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), reinterpret_cast
1
vote
2 answers

DirectWrite + Direct2D custom text rendering is hairy

I'm evaluating Direct2D for research purposes, and while I was at it, I decided to render my usual help text with a DirectWrite custom text renderer, which converts the text to a path geometry in order to add outline (as demonstrated in the…
Asylum
  • 569
  • 4
  • 21
1
vote
1 answer

DirectWrite not adjusting for diacritics

I am currently working on debugging some of the DirectWrite code I have written, as I have run into issues when testing with non-English characters. Mostly with getting multiple Unicode characters returning proper indices. EDIT: After further…
Charlie
  • 680
  • 4
  • 11
1
vote
2 answers

Do Silverlight or WPF applications use Direct2D or DirectWrite to render fonts and UI?

I found a lot of information that IE9 uses DirectWrite and Direct2D instead of GDI for rendering UI. Is the same true for WPF and Silverlight applications?
1
vote
2 answers

Rendering font character LSB or placement varies

I am running into inconsistencies with how glyphs are spaced in some situations. I am using DirectWrite with a IDWriteFontFace and using the GetGlyphIndices with GetDesignGlyphMetrics to get the metrics of the glyphs so I can take each glyph, store…
Charlie
  • 680
  • 4
  • 11
1
vote
1 answer

Does Win32 Common Controls use Direct2D now?

I have a Direct2D app where I draw text messages with DirectWrite. It's all C++. I want to add an edit control which must support emojis and a button on the right. Does Win32 edit controls and buttons can be used in a Direct2D window and is the text…
holo
  • 331
  • 2
  • 13
1
vote
2 answers

How to wrap text around images or abstract shapes in DirectWrite with Direct2D?

I couldn't find an example of a block of text not rendered to a rectangular area. Ideally, it would be nice if ID2D1HwndRenderTarget.DrawText() would let me provide a polygon Geometry instead of a rectangle. I've tried adding a Direct2D Layer with…
McMaster
  • 11
  • 1
1
vote
1 answer

What exactly does IDWriteTextFormat1::SetLastLineWrapping do?

Documentation for IDWriteTextFormat1::SetLastLineWrapping() is insufficient: Sets the wrapping mode of the last line. If [the single BOOL parameter is] set to FALSE, the last line is not wrapped. If set to TRUE, the last line is wrapped. For…
Pablo H
  • 609
  • 4
  • 22
1
vote
1 answer

DirectWrite space char wrapping

First of all sorry for my bad English. But i can't solve my problem for the last few days. I am working on a simple text editor that use DirectWrite to render text. When i render my buffer, that contains a text, direct2d wraps my words, but this…
1
vote
1 answer

DirectWrite rendering issues - quads seem to be overlapping, with some aliasing

Screenshot of the problem: Here are the relevant bits of code - error handling etc. are omitted for clarity. D2D1_BITMAP_PROPERTIES1 bp; bp.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM; bp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE; bp.dpiX…
Bloog
  • 171
  • 1
  • 1
  • 7