Questions tagged [text-styling]

139 questions
527
votes
12 answers

How to set the font style to bold, italic and underlined in an Android TextView?

I want to make a TextView's content bold, italic and underlined. I tried the following code and it works, but doesn't underline.
d-man
  • 57,473
  • 85
  • 212
  • 296
119
votes
11 answers

Vertical (rotated) text in HTML table

Is there a (portable) way to rotate text in a HTML table cell by 90°? (I have a table with many columns and much text for the headings, so I'd like to write it vertically to save space.)
Florian Jenn
  • 5,211
  • 4
  • 23
  • 18
34
votes
3 answers

Android text style missing light, medium, thin,

When setting custom fonts for a textview, I can only choose normal, bold or italic: How can I set the style to be light instead of bold in the following example?
AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277
27
votes
4 answers

“text-overflow” for a QLabel’s text rendering in QT

I have got a QLabel element in a widget which can be resized. The text can overflow boundaries, so I need, for the application to look more elegant, some way to make the text generate an ellipsis (...) after the last totally visible word in the…
user1598585
20
votes
1 answer

How to set heading, subheading, body, footnote, and captions font for dynamic type text styles in Swift?

I was working through the Using Text Kit to Manage Text in Your iOS Apps tutorial. It was written for Objective C but I thought I would try to do it anyway using Swift. However, when I got to the following code I couldn't figure out how to set the…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
14
votes
1 answer

Handling UIContentSizeCategoryDidChangeNotification for NSAttributedString in UITextView

I have an NSAttributedString in a UITextView and would like to handle the UIContentSizeCategoryDidChangeNotification when working with Dynamic Type and specifically the text styles. All the examples I've seen (IntroToTextKitDemo) address the case…
byamabe
  • 1,421
  • 1
  • 12
  • 19
10
votes
3 answers

Android Textview Italic and wrap_contents

I am using 3 italic textviews with different colors
d-man
  • 57,473
  • 85
  • 212
  • 296
9
votes
3 answers

React native text word break strategy of strings with dash

Setup react: 16.6.0-alpha.8af6728 react-native: 0.57.4 Problem Word breaking in Text component does not handle strings with dashes the way app design wants it. I want to word wrap the whole word taking into account dashes. This whole…
hdsenevi
  • 953
  • 2
  • 14
  • 27
6
votes
5 answers

Any ideas about how to use CSS to emulate a messy stamp?

I'm interested in ways to render a span that to look something like one of these: Here are the tricks I plan on using: @font-face -{moz/webkit/o}-transform:rotate It's for a personal project so assuming the most modern CSS support is fine. Maybe…
user18015
6
votes
2 answers

After word break, align next line to the left rather than center

I am styling my paragraphs and I have line break after a certain amount of characters. I want to be able to make the line after the break to be aligned left rather than center. .justify { text-align: justify; text-justify:…
R3C0Nx00
  • 129
  • 1
  • 1
  • 9
6
votes
2 answers

How to print an String variable as italicized text

I have the following statements inside my class: String myName = "Joe"; System.out.println("My name is " +myName); I need the value on the variable myName to be printed as italic text.
LH7
  • 1,385
  • 2
  • 12
  • 16
6
votes
1 answer

WPF RichTextBox Syntax Highlighting Issue

Hello everyone I've been working on a WPF application that has a text editor this text editor should apply some styling or colorizing over some tokens (keywords) to highlight it and make it obvious,,, the problem is i tried very very hard but i…
a7madx7
  • 840
  • 1
  • 8
  • 18
5
votes
1 answer

Change style of html links in TextViews after executing Html.fromHtml

I'm developing an android application. I retrieve some data that looks like this: My Link to Google! I'm applying it to a TextView like…
Ditmar Wendt
  • 668
  • 4
  • 15
5
votes
3 answers

Styling not parsed from backend

I have an application with an angular frontend and C# backend. I'm receiving this rich text from the backend of my application: Hello world What gets displayed is " Hello world " What I want to be…
DLO
  • 914
  • 1
  • 13
  • 30
5
votes
1 answer

setting TextView's text style to TextAppearance.Appcompat... programmatically

I have been using: style="@style/TextAppearance.AppCompat.SearchResult.Title" in my layout xml, but this time i want to set text style programmatically from java code. But this code: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)…
1
2 3
9 10