Questions tagged [glyphrun]

GlyphRun - Microsoft WPF class representing a run of characters

GlyphRun is a low-level class in the System.Windows.Media namespace. It represents a sequence of glyphs from a single face of a single font at a single size, and with a single rendering style.

9 questions
8
votes
1 answer

How can I implement character ligature in Glyphs?

My question is about ligature in Glyphs. There is this example in msdn:
Ramin
  • 2,133
  • 14
  • 22
2
votes
2 answers

GlyphRun and the exact position of the cursor (WPF)

I would like to draw a text exactly in the place of the mouse cursor. Because I need very high performance, I would like to use GlyphRun. Everything works almost well, but unfortunately my text is slightly below the cursor. Can someone help me…
gmik
  • 31
  • 5
1
vote
1 answer

Precisely locating glyph text in WPF

I am writing a chemical molecule editor for Windows. As it has to be used in a Word Add-In I am restricted to using WPF for rendering structures. This is working quite well, apart from one tiny niggling point. I use GlyphRuns for rendering atom…
deadlyvices
  • 873
  • 6
  • 18
1
vote
0 answers

CTLineGetGlyphRuns strange behaviour with NSAttributedString

I have a string, let's say "Hello" I need to append in front and at the end "," so the string looks like this: ",Hello," now I want the text to be white and the "," in different color. So I do something like this: [attributedString…
L3M0L
  • 429
  • 8
  • 23
1
vote
1 answer

What does the renderingEmSize parameter in GlyphRun specify?

I'm trying to make a GlyphRun instance for use in a GlyphRunDrawing, but the documentation is just so bad that it's almost comical. For example, the parameter renderingEmSize is described like this: renderingEmSizeType: System.Double A value of type…
codekaizen
  • 26,990
  • 7
  • 84
  • 140
0
votes
0 answers

Glyph Run Spacing Issue

I'm having issue with spacing of my text after creating using the code below. I'm using a ttf file as input but the text looks like this: https://i.stack.imgur.com/ygG2V.png private void ConvertToGeometry(int count, double size) { ushort[]…
Wonka Bear
  • 21
  • 4
0
votes
1 answer

Displaying large text files with WPF C#

I'm trying to write a WPF application to display (possibly) large log files (50MB-2GB) such that they are easier to read. I tried loading a 5 MB file with ~75k lines into a GridView with TextBlocks but it was really slow. I don't need any editing…
Rouen
  • 3
  • 4
0
votes
1 answer

How to specify a TTC font index in a Glyphs.FontURI property?

I want to put a TTC (True Type Collection) font file in FontURI property of a Glyphs. I use .Net5.0 I found in the old silverlight documentation this…
Whiletrue
  • 551
  • 1
  • 7
  • 18
0
votes
0 answers

Reason for WPF Glyphs class existence given that GlyphRun class is available

I have been using the GlyphRun class to do low-level display of text on a Canvas panel. I just recently became aware of the Glyphs class. I do not understand the reason for the existence of the Glyphs class, given that the GlyphRun class is…
Sabuncu
  • 5,095
  • 5
  • 55
  • 89