font-size

Retaining font size when loading/saving RTF in WPF

拜拜、爱过 提交于 2021-02-19 00:50:46
问题 Consider the following RTF document {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}{\f1\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs22 Sample Text\f1\fs20\par } It contains "Sample Text" in font Segoe UI 11 pt. Now when I load and then save the document using WPF's FlowDocument and TextRange.Load() and .Save(), respectively, the font size is reduced to 10.5pt. Is there any way to retain the original font size

Retaining font size when loading/saving RTF in WPF

自古美人都是妖i 提交于 2021-02-19 00:48:03
问题 Consider the following RTF document {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}{\f1\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs22 Sample Text\f1\fs20\par } It contains "Sample Text" in font Segoe UI 11 pt. Now when I load and then save the document using WPF's FlowDocument and TextRange.Load() and .Save(), respectively, the font size is reduced to 10.5pt. Is there any way to retain the original font size

The font-size property on iphone “landscape” seems larger?

心不动则不痛 提交于 2021-02-11 12:19:30
问题 I don't understand why the font-size property on iPhone "landscape" seems larger than portrait or desktop browser... I have for body font-size: 100% and for text inside image 17px PORTRAIT LANDSCAPE I assure that in landscape version text seems larger. 回答1: Include this to your site: body { -webkit-text-size-adjust: none; } 来源: https://stackoverflow.com/questions/53103444/the-font-size-property-on-iphone-landscape-seems-larger

Vertical alignement of span inside a div when the font-size is big

柔情痞子 提交于 2021-02-11 06:17:44
问题 Note: I've already read How to vertically center a <span> inside a div? but here it's slightly different (see below). I'm trying to insert some big text inside a circle button, an image inside another one, and a title aligned vertically. This perfectly works on Chrome (I've used various answers from Circle button css): But strangely, it doesn't work on Firefox and also iPhone Safari (bad alignment): How to solve such a vertical alignment problem? .circlebtn { height: 5.4em; width: 5.4em;

Is there a way to change the font size of a flextable caption?

不羁岁月 提交于 2021-02-08 09:01:55
问题 Is there a way to change the font size of a flextable caption? I have used the set_caption() command, which works fine, but I don't like the size of the font when I knit to HTML from Markdown. 来源: https://stackoverflow.com/questions/59552572/is-there-a-way-to-change-the-font-size-of-a-flextable-caption

how to allow the user to change font Swift

血红的双手。 提交于 2021-02-07 10:58:23
问题 I am building an application that display details and i want to allow user to change font of these details I have done some researches but all of them were to go to device's settings and change the font from there so, is there any way to have similar settings inside my application Thank you in advance Update i used the following slider but it didnt works @IBAction func FontSlider(sender: AnyObject) { var currentValue = Int(Slider.value) as Int println(currentValue) ingredients.font = UIFont

How can I calculate the size of font when using different font-types?

99封情书 提交于 2021-02-05 07:49:08
问题 This article (Deep dive CSS: font metrics, line-height and vertical-align - Vincent De Oliveira) says we can determine a font type’s 'real' px size by adding its ascender and descender and comparing this value with its em-square (UPM). For instance, in the example it gives, a font-type with 1100 ascender and 540 descender (its UPM is 1000) means when font-size is set to 100px it's actually 164px. Don’t you also need to add its x-height? 回答1: Don’t you also need to add it’s x-height? No, in

Scale texts of different lengths to fit container width

一世执手 提交于 2021-02-04 21:56:15
问题 I have an element with a certain size, that contains texts of single or multiple lines in different lengths. Now I want to scale the font-size of these texts in such a way, that the longest line of the text fits perfectly into the containers width. As an example, I want this markup .container { width: 400px; border: 1px solid green; padding: .5em; } .container>div { border: 1px dotted gray; } <div class="container"> <div>Lorem ipsum dolor sit amet.</div> <div>Lorem ipsum.</div> <div>Lorem

Scale texts of different lengths to fit container width

浪子不回头ぞ 提交于 2021-02-04 21:51:51
问题 I have an element with a certain size, that contains texts of single or multiple lines in different lengths. Now I want to scale the font-size of these texts in such a way, that the longest line of the text fits perfectly into the containers width. As an example, I want this markup .container { width: 400px; border: 1px solid green; padding: .5em; } .container>div { border: 1px dotted gray; } <div class="container"> <div>Lorem ipsum dolor sit amet.</div> <div>Lorem ipsum.</div> <div>Lorem

Jquery - Fit text into element with only letterspacing & word-spacing

允我心安 提交于 2021-01-29 22:27:26
问题 Is there a plugin for this? I have been screening of the internetz and found bigText, Justify, fitText, textFit but they all seem to work with the font-size which I dont want to do. I only want the text to fit inside a element with a defined width. HTML: <div id="title"> <h1>One header that i pretty long</h1> <h2>Sub-header that is shorter</h2> </div> CSS: #title { width: 300px; } h1 { font-size: 3em; } h2 { font-size: 2em; } The problem with the plugins that I've found so far is that the sub