fontsize

Change ContextMenu Font Size in C#

Is it possible to change the font size used in a ContextMenu using the .NET Framework 3.5 and C# for a desktop application? It seems it's a system-wide setting, but I would like to change it only within my application. ...

Why does Firefox 2 display fonts larger than specified in CSS?

I have a webpage where Firefox 2 displays the font certain, really specific elements, larger than than what I specified in the CSS. When I look at the affected element (mostly td elements as far as I can tell) with Firebug, I see that the font size is inherited from the body (11px, so its not a relative size). No styles overwrite this f...

Font size in CSS - % or em?

When setting the size of fonts in CSS, should I be using a percent value or em? Can you explain the advantage? ...

What's a the best small font for eclipse?

The default Courier New 10pt is larger than necessary for me. However, using that font at 8pt does not look very good. Are there better choices for a more readable, very small (e.g., 8pt) font for eclipse? ...

Rendered pIxel width data for each character in a browser's font

I have a table column that needs to be limited to a certain width - say 100 pixels. At times the text in that column is wider than this and contains no spaces. For example: a_really_long_string_of_text_like_this_with_no_line_breaks_makes_the_table_unhappy I would like to calculate the width of text server-side and add an ellipsis aft...

Font size for programming?

After reading this question I installed Consolas. The trouble is, now the text seems too small. I have to adjust it to size 12 to use it comfortably. Anyone else experience this when switching to Consolas (or any other font)? Do my eyes just have to adjust to this new font or is it a sign that my eyesight is deteriorating? My resolu...

CSS: font-size: inherit * 70% ?

Is there a way to specify the font size for a class to be, say, 70% of the inherited font size? I have a general "button" class that sets up my buttons with the appropriate borders, background, etc. I use it in multiple places, including one where the font size is fairly small and another where the font size is quite large. <div style=...

Fixed font size in firefox?

I'm wanting to keep the font size of a navigation menu the same size for all browsers. I set the font-size of the navigation menu text to a specific pixel size. In IE this works, but not in FF. The problem is, if a person changes their browser's font size, then it completely ruins the menu layout in FF. Is there a way to adjust thi...

Ems to Pixel Conversion - Why 62.5% and not 6.25%?

I know that a lot of us are familiar with setting the font size on the body element in our CSS to 62.5%. This means that 1em will equal 10px and helps for keeping things pixel perfect but also allows for scaling of fonts. So wouldn't that mean that setting it to 6.25% would equate to 1em = 1px? Seems like an even simpler conversion rath...

How to use a different coordinate system in WPF? (scaling only)

Hi, (Let me give you some context) I am currently designing an application that is supposed to generate a printable A4 page based on some data. Naturally, the device independent pixels of WPF (96 pixels/inch) are not a very natural unit of measurement in the paper world. Something like millimetres would be more appropriate. So I got my c...

CSS problem with relative sizes

I have this code <html> <head> <style type="text/css"> .frame {width: 50em; border: 1px solid black} .frame label {width: 20em; display: block; text-align:right; border: 1px solid green} .frame label span {width: 20em; display: block; font-size: .5em; border: 1px solid red; text-align: righ...

How to render text in .NET in the same size as browsers does given CSS for the text.

I am trying to create a "save webpage as bitmap"-function on a website and i have some problems rendering the text in the correct size on the server side. The fontsize settings for the text on the client is: .textDiv { font-family: Verdana; font-size:16px; } If i try to render this on the server with float emSize = 16; g.Dra...

CSS font size: relative vs. absolute values. Which to use?

What's the best way to size text across browsers? What are the advantages and disadvantages of defining font size in pixels / em? ...

Consistent font-size across browsers (web development)

When creating web pages how do we achieve a consistent font size across browsers. I have used something like "font-size: 11pt; font-family: Helvetica,'Lucida Grande'" in my CSS, but the text looks different in Firefox, IE, Google Chrome and Safari (and this is not even on different platforms). Basically on the same machine, that is runni...

Font sizes in Core Graphics

Hello everyone, I'm trying to render a bit of text using Core Graphics APIs and I'm running into some conceptual difficulties. I'm trying to specify font size using CGContextSetFontSize. The size parameter is in something called "text space units". What is that? How does it map to "em" units? Thanks ...

Estimate pixels of proportional font in SVG or Java

Is there an way to estimate the number of pixels used by a proportional font? I am writing software that creates an image in SVG and transform that to PNG in Java. In this image I am using a text with a proportional font (size 16). I can sometimes fit 26 characters in the picture and sometimes only 19. This is because 'WWW' takes much m...

Why is a font in .NET of size 8 displayed as 8.25?

When you select, for example, a Size of 8 in a Font Dialog for Microsoft Sans Serif, it returns a font that .NET displays as having a size 8.25? Why is this exactly? ...

Very Strange CSS problem on Internet Explorer. I have no idea what is wrong!

I have just been testing a web site I have set up in Internet explorer. Works fine in Firefox of course. I have a set of style sheets most of which have a background picture I, the user can select the different style sheets as they please. The style sheets render exactly the same apart from colours and backgrounds, of course the text bas...

How to calculate text height and width for a PPLA printer?

I'm building an application to print labels using a PPLA printer (Argox OS-214). So far, I've got to manage how to centralize a barcode in a label, but now I'm stuck trying to do the same for text. I'm using the ASD smooth fonts, but I don't know how to calculate the final text size using these fonts. Anyone who has good knowledge about...

drawAtPoint: and drawInRect: blurry text

When drawing strings using drawAtPoint:, drawInRect: and even setting the text property of UILabels - the text can sometimes appear slightly blurry. I tend to use Helvetica in most places, and I notice that specific font sizes cause some level of blurriness to occur, both in the simulator and on the device. For example: UIFont *labelF...