Questions tagged [formatted-text]

77 questions
45
votes
8 answers

Set superscript and subscript in formatted text in wpf

How can I set some text as subscript/superscript in FormattedText in WPF?
Firoz
  • 7,224
  • 10
  • 41
  • 56
34
votes
1 answer

How to code and print a character string formatted with line breaks?

If I have a string that contains line breaks, how can I code it in R without manually adding \n between lines and then print it with the line breaks? There should be multiple lines of output; each line of the original string should print as a…
mmyoung77
  • 1,343
  • 3
  • 14
  • 22
27
votes
1 answer

FormattedText.FormttedText is obsolete. Use the PixelsPerDip override

I am trying to populate labels to a horizontal slider and I was successfully able to do it using a class that derives from TickBar by passing the Text to FormattedText constructor. But now when I take the same code and paste it in Visual Studio that…
nikhil
  • 1,578
  • 3
  • 23
  • 52
7
votes
1 answer

Add Bullets with proper formatting in Android

I wanted to show bullets in android text. I have added them successfully. I search over internet and found that you can add bullets. but if text goes more than one line it does not follow proper spacing like html list does. See Screenshot below.…
Ashish Kudale
  • 1,230
  • 1
  • 27
  • 51
7
votes
2 answers

formatted string of series of numpy array elements

It seems quit trivial to me but I'm still missing an efficient and "clean" way to insert a series of element belonging to numpy array (as aa[:,:]) in a formatted string to be printed/written. In fact the extended element-by-element specification…
gluuke
  • 1,179
  • 6
  • 15
  • 22
6
votes
0 answers

RenderTargetBitmap is always anti-aliasing my DrawingVisual

I have to render the text from a TextBox into a WriteableBitmap. This code is working pretty well but the text in it is blurry or anti-aliased. Any ideas on how to keep it aliased and crisp? text = new FormattedText(tb.Text, new…
6
votes
1 answer

How do I Convert a FormattedText String into a Geometry-Based Object?

How do I convert a FormattedText string into a geometry-based object? I don't think this question requires much explanation, and I can't think if very many other details I could give ... I just need to convert the FormattedText into something I…
Giffyguy
  • 20,378
  • 34
  • 97
  • 168
5
votes
2 answers

How to use function return value directly in Rust println

Rust allows formatted printing of variables this way: fn main(){ let r:f64 = rand::random(); println!("{}",r); } But this doesn't work: fn main(){ println!("{}",rand::random()); } It shows up this error: | 31 | …
Dee
  • 7,455
  • 6
  • 36
  • 70
5
votes
1 answer

Text Outlining Using WPF Shader

I tried to google it out, but is there any sample Shader effect which I could use to produce an outlined FormattedText. I was able to get the outline by using BuildGeometry(), but the performance is very poor! PS: Since I'm new to this and still…
Trainee4Life
  • 2,203
  • 2
  • 22
  • 38
5
votes
1 answer

FormattedText Width property does not take trailing spaces into account

I am using System.Windows.Media.FormattedText to do some low level rendering (specifically, trying to render math equations in a typographically pleasing manner). For this, precise metrics on the text blocks I am using are critical. I am creating…
Tarydon
  • 5,097
  • 23
  • 24
5
votes
2 answers

Best way to store multiple lines of data in MySQL?

I'm looking at storing multiple lines of data in MySQL (or your choice), an example would be a poem. I wouldn't know how many lines it could be and I have to keep its structure intact so when I go display it to my end users on a site it is properly…
Matthew
  • 837
  • 3
  • 18
  • 33
4
votes
2 answers

FormattedHtmlMessage react-intl v4

After upgrading to react-intl@4, we are facing a problem with all formattedHtmlMessages which have been used as html tag. We tried replacing by formattedMessage and tried…
Noon
  • 139
  • 1
  • 3
  • 11
4
votes
2 answers

Load markdown text into the Xamarin.Forms Label

Recently, Xamarin.Forms Label has support for FormattedText. So I want to use that FormattedText property to load the markdown text. For example, I have below kinds of markdown text, 1. **Hi**, How are you? 2. Hello **John**, _Good Morning_ I…
Selvamz
  • 362
  • 3
  • 16
4
votes
1 answer

Get formatted resource string from xml layout

How can get a formatted string from res\values\strings.xml in xml layout file? Eg: Have a res\values\strings.xml like this: Read online and an xml layout file…
vitiello.antonio
  • 323
  • 3
  • 12
4
votes
2 answers

Subscript / superscript in FormattedText class?

I'm creating Text using the FormattedText class - but how can I subscript oder superscript Text when using this class? I found solution on how to do this when using a TextBlock, but I'm using FormattedText and not the TextBlock ): Thanks for any…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
1
2 3 4 5 6