w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
multipule text font size for font in one text box
Use a richtextbox instead. richTextBox1.SelectionFont = new Font("Arial", 12, FontStyle.Bold); richTextBox1.AppendText("Two of the peak human experiences are"); richTextBox1.SelectionFont = new Font("Tahoma", 16, FontStyle.Bold); richTextBox1.AppendText("good food and classical music");

Categories : Wpf

CSS3 @font-face causes the font file to output its sample text
I'm also tested with the SteelTongs web font in firefox and chrome, it is not supported,the font link is abstractfonts- steeltongs ,U just change the font.

Categories : CSS

How to preserve text formatting in RichTextBox like Bold, Italics, font color, font size, etc?
RichTextBox supports rtf content, you can't past directly Word content in your RichTextBox. You need to convert the word document into .rtf file. Best way is to use the save As dialog in Microsoft Word. Then you could deploy the document with your application and then load rtf content in your RichTextBox using LoadFile method. RichTextBox1.LoadFile("Help-File.rtf") Obviously, it supposes that basic formatting like mentioned in title (Bold, Italics, font color, font size, ...) are enough for this purpose, since the rft format does not support obviously all MS Word features. Otherwise you may have to implement your own parse/interpretation logic.

Categories : Vb.Net

how to center text inside donut chart embedded in combination chart
You can use renderer to add custom text on your chart. Then you can add events using element.on(). See live example: http://jsfiddle.net/sJfuA/2/ $('#container').highcharts({ chart: { events: { load: function() { var chart = this, rend = chart.renderer, pie = chart.series[4], left = chart.plotLeft + pie.center[0], top = chart.plotTop + pie.center[1], text = rend.text("text", left, top).attr({ 'text-anchor': 'middle'}).add(); text.on("mouseover", function() { alert("hover!"); }); } } }, ... });

Categories : Highcharts

How can I do to merge font attributes in css
If you want to use the font shorthand property, there are a few mandatory options that you have to specify or your browser will ignore the entire line, as you've seen. I could explain it all here but I found a handy graphic from Impressive Webs that explains it much better than I could. You can find it here: http://www.impressivewebs.com/css-font-shorthand-property-cheat-sheet/

Categories : CSS

How to change the font-awesome text font?
Fixed - used the following code to overwrite <span class="icon-thumbs-up"> <span style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif; font-size:12px;" >vote</span> <span class="icon-thumbs-down">

Categories : Twitter

Change the font size of a ggplot chart
Size of texts are changed using function theme() and then choosing element you need to modify. To set font size for all texts in plots attribute text should be changed. ggplot(mtcars,aes(cyl,mpg))+geom_point()+theme(text=element_text(size=21))

Categories : R

.Net Chart Control label font always bold
Try this (where ChartAreas["A"] = your ChartAreas(0)): chart1.ChartAreas["A"].BackColor = Color.Gray; chart1.BackColor = Color.Gray; // chart1.ChartAreas["A"].AxisY.LabelStyle.Font = new System.Drawing.Font(chart1.ChartAreas["A"].AxisY.LabelStyle.Font, FontStyle.Regular); MessageBox.Show(chart1.ChartAreas["A"].AxisY.LabelStyle.Font.Bold.ToString()); Also try changing your font to a font that has both a Regular and Bold appearance For instance: System.Drawing.Font f = new System.Drawing.Font("Tahoma", 10, FontStyle.Regular); chart1.ChartAreas["A"].AxisY.LabelStyle.Font = f;

Categories : Dotnet

python-docx - how to control font and other attributes
I don't think there's a one-click super easy way to edit font/size etc with the docx module (yet, at least). Fortunately, it's relatively easy with lxml and it's not too difficult to get a basic grasp of the xml format with a bit of poking and prodding. Try changing the extension of your file from .docx to .zip, and open /word/document.xml. The elements there that modify specific text are children of both the w:pPr (paragraph properties) and the w:rPr (run properties) elements. This link provides a good overview of the methods that you can use to sift through the document.xml file and add/remove/edit as you see fit. I'd also suggest looking at the "def paragraph" function in the docx.py module. There are a couple of direct examples there of appending various descriptive elements to parag

Categories : Python

How can iText embed font used by JFreeChart for chart title and labels?
Found the answer to my own question above in the iText book, 2nd edition, listing 14.20 "Text2ToPdf1.java". One issue to be aware of is the use of Font class for java's AWT versus iText -- they both share the same Font class name, so be sure to keep them organized in your code (e.g. the linked Font in http://itextpdf.com/examples/iia.php?id=254 for import java.awt.Font; points to com.itextpdf.text.Font). I've included the path java.awt.Font in the code below to avoid confusion: // Create a custom font mapper that forces Graphics2D to use a specific font FontMapper myChartFont = new FontMapper() { public BaseFont awtToPdf(java.awt.Font font) { try { return BaseFont.createFont("/path/to/your/font/myFontName.ttf",BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

Categories : Pdf

How do I specify exact positioning and font attributes an an iOS (iPhone / iPad) design document?
If you haven't looked at the Apple Human Interface Guidelines that would be a good place to start. All the required screen resolution information is in there. You can give your developer the required spatial info in pixels. An iPhone 5 would have a coordinate of (0,0) for the top left corner of the screen and the bottom right would be (320, 568). For positioning elements, (X-coordinate, Y-coordinate, width, height) in pixels. Spacing between elements: number of pixels Font sizes in points. Line height in pixels or em colors in hex color codes

Categories : Iphone

Why is the text font-face setting killed/copied along with the text?
It happens because text color and font are just like any other text property. And properties are copied along with their text by default (simply because they could contain information you DO want to copy). Don't worry too much about it, this information doesn't get saved into the file, and, in the case of font locking, it's usually overridden quite quickly. For your last question, you can check the detailed contents of any killed string by looking at the kill ring M-x describe-variable RET kill-ring RET.

Categories : Emacs

How to change the tabControl tab pages label font, font color and font size in VB 2012
This has been reported as a bug and, if I'm reading correctly, MS have confirmed it. Here's the bug report with a programmatic workaround. Hope this helps :)

Categories : Vb.Net

Custom font (@font-face) and Google font doesn't work in IE8
Could you make a jsfiddle.com where you show the problem? I have created this example and it works fine in IE8 (just Google Fonts): http://jsbin.com/omozet/1 Have you tried some of the other solution Paul Irish shows?

Categories : Internet Explorer

@font-face not working (result font different from the original font)
There are two problems with what you have there. You have declared the fonts "doctor_soos_boldbold" and "doctor_soos_lightregular" but you have not specified the correct path, at least, I believe you do not have those fonts in the current directory. You need to specify where the fonts are properly. Where you have: @font-face { font-family: 'doctor_soos_boldbold'; src: url('doctor_soos_bold_2.1-webfont.eot'); src: url('doctor_soos_bold_2.1-webfont.eot?#iefix') format('embedded-opentype'), url('doctor_soos_bold_2.1-webfont.woff') format('woff'), url('doctor_soos_bold_2.1-webfont.ttf') format('truetype'), url('doctor_soos_bold_2.1-webfont.svg#doctor_soos_boldbold') format('svg'); font-weight: normal; font-style: normal; } Every spot that s

Categories : HTML

Bubble chart , scatter chart ,candlestick chart using core plot
Core Plot natively supports scatter plots and candlestick charts. You can make a bubble chart easily by using custom plot symbols for a scatter plot and varying the size of the plot symbols to represent the third variable.

Categories : IOS

Text with "f" following "i", cannot see the dot on the "i", sans font
What you are seeing is a ligature glyph for the combination of 'f' + 'i' characters. Frequently, the combination of the standalone 'f' + standalone 'i' will end up in conflict: the overhanging portion of the 'f' will collide with the dot of the 'i'. The use of a ligature glyph to represent the combination of characters allows a font designer to avoid a collision. In this case, the font designer opted to omit the dot of the 'i'. In other font designs, the dot of the 'i' will stay but the length of the overhanging portion of the 'f' will change so as to avoid a collision. If you examine some other font designs that include a ligature for 'f' + 'i' you will see these different visual treatments. As this is a font design decision, it's difficult to characterize this as a "mistake"; more like

Categories : Android

How to set font to ALL of my text field?
You could try to loop through all the subviews and check if they are an instance of UITextField or any subclass of UITextField. If they are, you can set the font property. I quickly wrote some sample code to show you how you could do this: for (UIView *subview in [[self view] subviews]) { if ([subview isKindOfClass:[UITextField class]]) { UITextField *textField = (UITextField *)subview; [textField setFont:[UIFont fontWithName:@"ABeeZee-Regular" size:14.f]]; } } Be aware of the fact that this code only loops through the 'closest' children of [self view] and thus won't modify views deeper in the hierarchy.

Categories : Iphone

Text Font Code Error
This is how I do it: Typeface font = Typeface.createFromAsset(getActivity().getAssets(),"fonts/DejaVuSans.ttf"); sometextview.setTypeface(font); I'd start with the name of your font - suffix ? dash ? Oh ... and have you placed your font in the "fonts" subdirectory ?

Categories : Android

Set Legend Text Pie Chart
Pleas change the line with .SetSourceData method into this one: ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("b6:c6," & "b" & x & ":c" & x)

Categories : Excel

Text On each bar of a stacked bar chart d3.js
Here is the important piece of code: state.selectAll("rect") .data(function(d) { return d.ages; }) .enter().append("rect") .attr("width", x.rangeBand()) .attr("y", function(d) { return y(d.y1); }) .attr("height", function(d) { return y(d.y0) - y(d.y1); }) .style("fill", function(d) { return color(d.name); }); This binds each data point to the colored rectangles. To add text, change it like this: var ages_enter = state.selectAll("rect") .data(function(d) { return d.ages; }) .enter(); ages_enter.append("rect") .attr("width", x.rangeBand()) .attr("y", function(d) { return y(d.y1); }) .attr("height", function(d) { return y(d.y0) - y(d.y1); }) .style("fill", function(d) { return color(d.name); }); ages_enter.append(

Categories : D3 Js

Transitions and text attributes in a div in D3.js
The <p> tag doesn't have a fill or a font-size attribute. It does have a css style attribute which you can use to do more or less the same thing and which you can change with transition.style This could look like this: svg.select("svg #clickone").on("click", function() { svg.select('p') .transition() .duration(2500) .text("new text new text new text new text new text") .style("background-color","red") .style("font-size","20px") });

Categories : HTML

Font displays in text field very small
font.deriveFont has two overloaded forms that can be quite similar. The one taking int sets the font style, the one taking float sets the font size. YOu are invoking the int version instead of the float version. Change 24 to 24.0f, and it will work

Categories : Java

How to change the default text font in Eclipse?
Software Salariman has posted a solution - "Change Default Text Font in Eclipse". The default font is set in: Window > Preferences > General/Appearance/Colors and fonts > Basic/Text Font

Categories : Eclipse

How to put a symbol font character inside svg ?
This question suggests that you can do it by putting in the actual Unicode character instead of the code. Just make sure that the charset of your page is set to UTF-8. You also need to make sure that the font is available, e.g. by embedding it.

Categories : Javascript

Why isn't javafx.scene.text.Font Serializable?
I suspect it has to do with serializable classes generally not being compatible between releases. If the application relies on the UI being serializable, you could have some major problems between releases. You can see the warning on swing components about using serialization. Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder. That said, I'll put my opinion here too. To me, it messes with MVC separation to be serializing the UI (Granted there are other arcitectures out there too - MVC

Categories : Java

aggdraw cannot load font (no text renderer)
The problem was with my FREETYPE_ROOT. Line 32 of aggdraw's setup.py should be as follows: FREETYPE_ROOT = "/usr/local" After changing that line, rebuilding and reinstalling, the test.py script above works fine. I've updated my install script to apply that patch.

Categories : Python

Write Text in PDF in Hindi font using pdfbox
Here i tried this, and got something what you want, use the same code, simply download the PDTrueTypeFont.java (from pdfbox-1.8.2-src.jar) file and include into your project, then modify the condition before, int platformEncoding = cmaps[i].getPlatformEncodingId(); if ( CMAPTable.ENCODING_UNICODE == platformEncoding) modified, int platformEncoding = cmaps[i].getPlatformEncodingId(); if ( CMAPTable.ENCODING_UNICODE == platformEncoding || CMAPTable.ENCODING_SYMBOL == platformEncoding) because, this class not supporting the ENCODING_SYMBOL. so only you are not able to create the pdf with different fonts. Don't include the PDTrueTypeFont from the package pdfbox. Use from your local package.

Categories : Java

Enabling richt text font (RTF) in QComboBox
Consider QComboBox::lineEdit() method. You can try to apply your changes to the QLineEdit directly if it's possible. Otherwise you can subclass QLineEdit and change its behaviour to what you want, and then insert it using QComboBox::setLineEdit. Maybe you will need to make the combo box editable in order to use this.

Categories : Qt

How can I change the font for my auto-email's text?
You appear to be sending the mail as a plain-text email, not as an HTML mail (which you need if you want to use text formatting). See this tutorial. The most important difference is that you need to specify text/html as the mail's MIME type message.setContent("Some text <b>bold part</b> ... continue", "text/html"); Some mail clients also interpret a few plain-text commands such as "Some text *bold part* ... continue", but I wouldn't rely on that.

Categories : Java

Which font should I use in PHP image to get text border effect
What you're attempting is impossible. The text will be rendered slightly differently depending on what OS & browser the user is ending whereas the background image with the glow will have to be set once universally. I am happy to see you using my imagettftextblur() function though.

Categories : PHP

DirectWrite text position different by font size
The term @evilruff is referring to is called 'internal leading'. You can use IDWriteFontFace::GetMetrics or possibly IDWriteFontFace::GetDesignGlyphMetrics to get this value (for GetMetrics, the value you're looking for is most likely metrics.ascent - metrics.capHeight). The values here are in Font Design Units, not pixels (of any sort). You can convert these values to em height by dividing by metrics.designUnitsPerEm; typically, font sizes in DirectWrite are specified by the pixel size of the (lowercase) m; so if you multiply the values in ems by the font size, you should get the values in pixels.

Categories : C++

Change font color to green for the text?
Use span. Add this in your stylesheet: span{color:green;} Your Code. $('#myform #progress').html('<img src="images/ajax-complete.gif" /> <span>Successful</span>.')

Categories : Javascript

Change font of text next to radio button?
You set the font to the text next to a RadioButton the same way you do to a TextView: RadioButton rb = (RadioButton) findViewById(R.id.radiobutton); Typeface font = Typeface.createFromAsset(getAssets(), "SF_Cartoonist_Hand_Bold.ttf"); rb.setTypeface(font);

Categories : Android

How we can provide the font style to text in ListView
You can use this to change to a different built-in font, use android:typeface in layout XML or setTypeface() in Java Typeface type = Typeface.createFromAsset(getAssets(),""); txtyour.setTypeface(type);

Categories : Android

How can I diplay whole text in RichTextBox using preseted font
How are you setting the font? I assume you are using the Win Forms RichTextBox. I have managed to produce a very simple application which does what you have described as what you need: private void button1_Click(object sender, EventArgs e) { richTextBox1.Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 12.0f); richTextBox1.Text = "test ěščřžýáíé"; } With a Button button1 and a RichTextBox richTextBox1. When the button is clicked the text appears.

Categories : C#

How to set font color and style for PDF using core text?
Try below code, in this code i've changed my font style and size with CTFontRef +(void)drawText:(NSString*)textToDraw inFrame:(CGRect)frameRect { CFStringRef stringRef = ( CFStringRef)textToDraw; CGColorSpaceCreateWithName(stringRef); NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:textToDraw]; CTFontRef helveticaBold; helveticaBold = CTFontCreateWithName(CFSTR("Helvetica-Bold"), 24.0, NULL); [string addAttribute:(id)kCTFontAttributeName value:(id)helveticaBold range:NSMakeRange(0, [string length])]; [string addAttribute:(id)kCTForegroundColorAttributeName value:(id)[UIColor whiteColor].CGColor range:NSMak

Categories : Iphone

QLineEdit and Changing font for the “PlaceHolder” text
The placeholder is shown only if text() is empty. Connect textChanged to your slot and set appropriate font using setFont. If text() is empty, set placeholder font, instead set normal font.

Categories : Qt

How do I superimpose text on a Google chart?
Here's a hack to get what you want: // assumes your DataTable contains 1 month column and all other columns are the data series in your chart var columns = []; for (var i = 0, i < data.getNumberOfColumns(); i++) { columns.push(i); } columns.push({ type: 'string', role: 'annotation', calc: function (dt, row) { var sum = 0; for (var i = 1, i < data.getNumberOfColumns(); i++) { sum += data.getValue(row, i); } return sum.toString(); } }); var view = new google.visualization.DataView(data); view.setColumns(columns); Use the view to draw the chart instead of the DataTable, and you should have the labels you are looking for.

Categories : Javascript

Wrap text labels in bar chart 3d.js
Mike Bostock himself has addressed this issue. function wrap(text, width) { text.each(function() { var text = d3.select(this), words = text.text().split(/s+/).reverse(), word, line = [], lineNumber = 0, lineHeight = 1.1, // ems y = text.attr("y"), dy = parseFloat(text.attr("dy")), tspan = text.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); while (word = words.pop()) { line.push(word); tspan.text(line.join(" ")); if (tspan.node().getComputedTextLength() > width) { line.pop(); tspan.text(line.join(" ")); line = [word]; tspan = text.append("tspan").attr("x", 0).attr("y", y).attr("dy", ++lineNumber * lineHeight + dy + "em").text(word);

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.