font-size

Change only fontsize of NSAttributedString

时光毁灭记忆、已成空白 提交于 2019-12-11 05:56:48
问题 I have a NSAttributedString that was loaded from a RTF file, so it already holds several font-attributes for different ranges. Now I want to adapt the font size to the screensize of the device, but when I add a whole new font attribute with a new size, the other fonts disappear. Is there a way to change only the font size for the whole string? 回答1: If you only want to change the size of any given font found in the attributed string then you can do: let newStr = someAttributedString

Increasing default font size of this simple go gui application

别来无恙 提交于 2019-12-11 05:06:54
问题 I am using following simple demo code to create a GUI using Fyne package: package main import ( "fyne.io/fyne/widget" "fyne.io/fyne/app" ) func main() { app := app.New() w := app.NewWindow("Hello") w.SetContent(widget.NewVBox( widget.NewLabel("Hello Fyne!"), widget.NewButton("Quit", func() { app.Quit() }), )) w.ShowAndRun() } It works all right but I want to increase size default font of this GUI (so that font size should increase in label, button and any other widget like entry that may be

font-size in @media queries not applying

跟風遠走 提交于 2019-12-11 03:54:09
问题 I have managed to get the iFrame and body content width to change with the @media rule however I cannot get the font-size to adjust successfully. In my HTML my @media rules come after my style css in a seperate file. I cannot see what is preventing the font-size from changing the font-size. JSFiddle (Broken): http://jsfiddle.net/OliverNChalk/1a04Lx4g/ Style CSS: #bodycontent { z-index: 2; background-color: rgba(255,255,255,0.2); width: 80%; margin-left: auto; margin-right: auto; margin-top:

In XML Button size changes with its Font size

我只是一个虾纸丫 提交于 2019-12-11 02:22:27
问题 I know this sounds simple but I wanted to change a button's font size to fill the Button .Even though the text doesn't take all the space inside the button when I decrease text height for example the Button's height decreases as well.Is there any way I can change The text-size so it fills that space inside the Button or do I have to just use an Image Button . Here is the case :- <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation=

Should we still use em and % for defining the font-size of the website elements?

こ雲淡風輕ζ 提交于 2019-12-11 01:08:17
问题 I've found many suggestions on using different font-sizes and measure units for websites. Most of them suggest to define body font-size in % (100.1%) and use em for the rest part. I realize this is very useful for preserving the proportions while zooming in and out, especially for older browsers. But today most of the web browsers can constrain the proportions of website elements even for the fixed sized elements. So should we still use % and em or we can use pixels? Thank you. 回答1: I still

Change FontAwesome icon size in primefaces (p:commandButton and p:menuitem)

99封情书 提交于 2019-12-11 00:58:30
问题 I'm trying out the FontAwesome icon inside p:commandButton and p:menuitem. I'm able to display the icons, however compared to the built-in mobile icons, the FontAwesome icons seem too small. It looks inconsistent if you have other PF components using themeroller icons. Is there a way to increase size of the FontAwesome icons? and I have also try in style to increase font-size and fa-lg, fa-2x, fa-3x, fa-4x, or fa-5x classes but doesn't work. <p:commandButton icon="ui-icon-mobile-phone" id=

How to make the text hidden in hover

五迷三道 提交于 2019-12-11 00:07:17
问题 I am creating a menu that each item has a text and in hover an email replaces. So I do not know how to remove the text in hover. here is my code so far: #home { font: 30px 'LeagueGothicRegular', Arial, sans-serif; color: #f9f8cc; } #home:hover { background:url(style/images/icon/home.png) #FFF; background-size: 83px 56px; } 回答1: You can not remove the text with css, but you can make the text invisible, by setting its color to transparent, so your css would be: #home:hover { color: transparent;

css font-size and line-height not matching the baseline

守給你的承諾、 提交于 2019-12-10 23:28:49
问题 I'm trying to do something that should be very simple but I've spent my day between failures and forums.. I would like to adjust my font in order to match my baseline. On indesign it's one click but in css it looks like the most difficult thing on earth.. Lets take a simple example with rational values. On this image I have a baseline every 20px. So for my <body> I do: <style> body {font-size:16px; line-height:20px;} </style> Everything works perfectly. My paragraph matchs the baseline. But

Using Java to develop cross-platform, fonts scaling differently on different platforms

牧云@^-^@ 提交于 2019-12-10 23:08:11
问题 I am making some software for my university. A GUI is required. In the first revision of it, I had it use the System Look and Feel (so it would look like a native application within Linux/Mac/Windows). I found this to be cumbersome as I had to make all of my JLabels different sized based on the OS (regardless of resolution/pixel density/etc). After doing this I was like "okay, I'm NOT going to go through with this again" so I decided to not use the System look and feel and try out Nimbus. It

Coordinate scaling causes too large font sizes in QPainter::drawText

∥☆過路亽.° 提交于 2019-12-10 23:05:13
问题 I'm working on simple 2D visualization module for MD simulation code. What I'm trying to do is drawing positions of simulated molecules using: myPainter.drawEllipse(myQPoint,myRx,myRy) And that part works pretty good on my visualization widget. The thing that happened to be a problem is writing text which should represent each molecule's ID (integer). myPainter.drawText(myPosPoint,QString::number(mySoftMolecule2D->getID())); It draws text but it is too large. This is probably because I need