Jump to content

Dimon_II

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Dimon_II

    Choice of Windows text rendering engines

    Guys, I have zero skill in DirectDraw... I just need to draw 1 color glyph with standard tools. I already create a program that aligns monochrome glyphs. Git: FontFit But in "the whole big Internet" there was only one free program for adding colored glyphs, and it has no scaling... OpenType SVG Font Editor (already slightly modified by a friend elricbk ) And I really want to make a more functional analogue. FreeWare-OpenSource.
  2. Dimon_II

    Choice of Windows text rendering engines

    I couldn't figure out how to load DWriteFactory fonts. Can you show an example where the emoji font is loaded dynamically (from resources/memory, non directly font file)? The AddFontMemResourceEx function only makes private fonts(invisible to DirectWrite), and AddFontResourceExW doesn't work for me.
  3. Dimon_II

    Web-fonts v Desktop-fonts

    I ran into a similar problem and analyzed it much deeper (developing a font editor to add and align colored svgs to a font). That is, I do not have my own font built into the application, but the ability to select a font file: 1. I want to load a font from a file and use it: AddFontMemResourceEx / AddFontResourceExW Both functions load a font, but they don't return its name or any handle that can be used to identify it! You either need a separate font header parser, or use an undocumented function GetFontResourceInfoW (gdi32.dll). If the font file has a bold or italic typeface, then the name is not enough - if the system has a font of the same name without a typeface or loaded font family, it will be used for display instead of the added one and a more detailed analysis of the file is required. 2. Regular font rendering does not support colored glyphs. As a result of experiments, it turned out that the DirectWrite and Direct2D methods called from Delphi do not see private fonts, and the AddFontMemResourceEx method for loading a font from memory creates only private ones. That is, for fonts with icons, this method cannot be applied. AddFontResourceExW only. 3. It turns out that I cannot modify the font in memory and re-initialize. For any display by standard means, the font must be saved to a temporary file and loaded from the file. What is very inconvenient - AddFontResourceExW blocks the file from being deleted and opened. It is quite possible to write your own render for individual glyphs, but for displaying sample phrases, taking into account kerning and hints, you get something monstrously cumbersome and does not guarantee correct operation.
×