Vaadin TextArea font - textarea

Is it possible to change the font of a TextArea? I need a fixed-width font for displaying some raw data that is formmatted to display in columns in a console.

You can do it with CSS, just create a theme for your application and add the following CSS to set a fixed-width font to all TextAreas in the application:
textarea.v-textarea {
font-family: monospace;
}
Information about Vaadin themes can be found from Book of Vaadin.

Related

How to set font-family and font-size for TextArea with Vaadin CssLayout?

Is there documentation about it? How can I get a TextArea with Monospace 10px for displaying log output, without resorting to css stylesheet classes? I mean using the getCss(Component) method of CssLayout instead of addStyleName of TextArea.
I found that (at least) these properties seem to be silently ignored by Vaadin CssLayout:
width
height
font-family
font-size
UPDATE/SOLVED: Thank you guys for your help. Turns out that I forgot a semicolon somewhere between style statements. Vaadin then never pushed that faulty CSS to the DOM. Which made it difficult to debug for me.

TCPDF, making custom font text bold without separate ttf file

My project involves me creating a pdf with imputed text (with a custom font) that looks something like this:
#font-face{font-family:font1;src:url('fonts/font1.ttf');}
<p><span style="font-family: 'font1'; font-size: 12px;"><This is<strong>test</strong> text</span></span></p>
It uses the custom font perfectly except that bold and italic text look normal. The text is formatted bold when you copy/paste it out of the pdf it's just not showing in the pdf. I know I can incorporate a separate bold ttf file for my custom font, but I'd like to know if I can get around that. If I open the text above as an html, it is properly displayed so I know it must be possible

Override Calibri font in uiwebview

I'm writing a mail app that receives HTML format mail. Some of the messages contain online styles that reference the Calibri font.
I'd like to override the Calibri font (which maps to times new roman on iOS) with Helvetia. However other inline font styles should remain unchanged.
Is there any way to remap all instances of a font name to another font?
Would something like this work for you? The CSS here should override your inline font styles, respectively.
div[style] {
font-family: Helvetia !important;
}

Bootstrap - blue links

I have just created new ASP.NET MVC 5 application which uses by default Bootstrap 3.0. Please tell me why all glyphs icons which I use and action links are blue. You can see this in attached image. I didn't change anything in bootstap.css or any other .css file. Shouldn't it be black by default? How to repair this?
The glyphicons are probably inside of some link tags styled with a blue color and since the glyphicons are simply normal text (just a different font), they inherit the color of their parent element.
If you want them to be black everywhere you could add some css like:
.glyphicon {
color: #000;
}

sIFR Only the first font-style of glyph in my swf will display, cannot seem to call up the others

I've uploaded my .swf with bold, normal and italic glyphs of the font embedded. I then go to my sifr-config.js file to style the text using CSS. All properties except the font-style:italic; and font-weight:bold; are effective.
In fact, when I try to use these properties the flash text doesn't show up at all.
But if I go back into my flash file and change the first glyph from "normal" to "bold" or "italic" then re-export, it'll display the Flash text as whatever style I've just changed that first glyph to.
Here's my CSS all the properties except font-weigh and font-style work:
sIFR.replace(ronnia, {
selector: 'h1, logo-text',
wmode: 'transparent',
css: '.sIFR-root { font-size:200px; background-color:none; color: #000000; text-transform: uppercase; font-style:Italic; display:block;}'
});
I'm really new to the sIFR thing, any ideas what I could be doing wrong?
The code says Italic with a capital I. Flash can be picky with its CSS support, so that might be a problem. Other than that, it'd help if you could add a link to a demo page.
SOLUTION (eeehhh - work-around):
It's an export from flash-problem - I read some other posts about flash not exporting style 3 and 4 of the fla file.( Font wont export out )
This made me try this: I applied 'bold' as style to the first word in the sifr3-r436- fla file (the word 'Make') and exported it. In the demo index.html file i called this swf file but I DID NOT change the css code part to bold (font-weight: normal) - for the first time I was able to display the 'bold' style of the font using sIFR.
I think I'll stick to a work flow making seperate swfs for each font-weight.
Mark, I guess a lot of people struggle with this - are you going to tell people about this problem on the sIFR documentation site?
PROBLEM:
I also struggle with that problem. Only 'normal' works with some of the fonts. One of the fonts I'm trying to use don't have 'BoldItalic' so I set this to 'bold' - could that be the reason for 'bold' to fail?
Have anybody solved this problem yet? If not I'll try to set up a demo page for Mark to explore.
Like Jay I wonder if this is a font problem - are problem with some fonts a known issue?
Actually 'bold' 'italic' 'bold&italic' is a problem with almost all the fonts I try out. Only success with verdana and georgia...
What critical info have I missed? Do I do something wrong in the fla file?
I tried something to check whats doing what - I applied the bold font style to the 'normal' word in the fla file - but that does not have any effect. I guess it's just a question of embedding the font style in te swf-file.

Resources