Archive for September, 2009

Fix constant italics/font problem!

Friday, September 18th, 2009

When a rogue program decides to install its own version of system fonts, it may replace the original version of the font file with a shortcut in the font folder.  Once this program is uninstalled, the shortcut may now point to a font file that no longer exists.  Windows XP in turn reacts by turning all unspecified fonts into italics upon next reboot.

The simple way to fix this is to delete all shortcuts in the font folder and replace them with the actual font file.  By going to [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts], you can also double check the path of each font and look for any suspicious paths.

Share

Care With Font Size!

Friday, September 4th, 2009

A certain trend among designers, believing that small text gives a Web page a sleek appearance and provides more space per “page” for actual content, sometimes results in the use of unreasonably small font sizes.

Unfortunately, this does not go well with the diversity of platforms used to access Web pages, from portable devices with tiny screens to projection devices hooked to computers. And even within a specific platform, text settings may vary.

The problem here is a basic usability and accessibility issue: a good design should look good without requiring the user to enlarge or reduce the text size.

Forget <font>, use CSS

The proper, modern way to set the size of the text displayed in a Web page is to use Cascading Style Sheets. This is strongly recommended over the use of <font> tags in HTML, because CSS is more flexible, easier to maintain and saves bandwidth. It is not the purpose of the Tip to discuss the interest of CSS versus <font> tags, readers wanting more details on this issue will ask their favorite Web search engine for related information… We will focus on good usage of the CSS technology to create legible Web pages.

Good usage of CSS’s font properties

Here are a few basic rules that one should follow in order to create Web pages that are easy (enough) to read, using CSS’s font properties.

Size: respect the users’ preferences, avoid small size for content

  • As a base font size for a document, 1em (or 100%) is equivalent to setting the font size to the user’s preference. Use this as a basis for your font sizes, and avoid setting a smaller base font size
  • Avoid sizes in em smaller than 1em for text body, except maybe for copyright statements or other kinds of “fine print.”

Units: avoid absolute length units for screen display

  • Do not specify the font-size in pt, or other absolute length units for screen stylesheets. They render inconsistently across platforms and can’t be resized by the User Agent (e.g browser). Keep the usage of such units for styling on media with fixed and known physical properties (e.g print).
  • Use relative length units such as percent or (better) em
  • even better, if a base font-size is set for the document, use absolute size ([ xx-small | x-small | small | medium | large | x-large | xx-large ]) or relative size ([ larger | smaller ]) when defining the font size for a particular element within the document.

legible font-family

If using a small font-size, prefer a legible font-family with a high aspect value (see the section on font-size-adjust in the CSS2 specification for an explanation of the aspect value), which are more likely to be legible at such small sizes.

Share

Using MiniFonts for longer text passages!

Thursday, September 3rd, 2009

MiniFonts are intended to be used for small amounts of text in menus, navbars, banner ads and captions. In general, it is better to use regular ‘Verdana, Arial, Geneva’ typefaces for body text on a Web page because

(a) it requires fewer bytes,

(b) it can be resized by the surfer if necessary and

(c) it can be searched and indexed.

Remember, if your page contains only images and no text, it is unlikely to be seen as ‘important’ by search engines such as Google and will get a low ranking.

If you still want to set a larger amount of text with your MiniFonts for stylistic reasons, here are some tips.

Save your GIF at the lowest possible bit depth (usually 1-bit). It doesn’t matter if it has a transparent background or not. At 1-bit, you can get a reasonably large image under 1k. Blank space compresses very efficiently so don’t be too concerned about wide letter or line spacing, it won’t make much difference to the file size.

Remember it is an image. It should have an <img alt=”…”> attribute to provides a synopsis of the text when images are turned off or when screen reading software is used. You must have an <img alt> attribute for your page to validate.

You can also use the <img title=”…”> attribute to provide a ‘tooltip-style’ context-sensitive help message in some browsers when the mouse passes over the image.

Either, or both of these will give search engines something to latch onto.

Share

Changing Windows to work at 72 ppi!

Wednesday, September 2nd, 2009

The difference between points and pixels on Windows causes problems in some programs such as PaintShop Pro and Macromedia Flash.

PaintShop Pro only allows type to be specified in points and doesn’t accept the fractional point sizes necessary to do the conversion – 10 pixels = 7.5 points.

Flash only allows line spacing to be set in points, not pixels, so multi-line text can go out of sync with the screens natural pixel grid.

Temporarily setting Windows to run at 72 pixels per inch instead of its default 96 ppi solves these problems completely. Once you have made your files, you can switch back.

Here’s how you do it.

  1. Right-click on the desktop and choose ‘Properties’ to bring up the ‘Display Properties’ dialog.
  2. Click on the ‘Settings’ tab.
  3. Click the ‘Advanced’ button.
  4. You will see the DPI Setting pop-up menu, which will be set to ‘Normal Size [96 DPI]‘.
  5. At the bottom of the pop-up menu, you will find the ‘Custom Settings’ item – choose it.
  6. Set the scale to 75% and you should see a sample of Arial 10 point at 72 pixels per inch, which is what we want.
  7. Click on ‘OK’ and you will be prompted to restart Windows.

When Windows restarts, everything on the screen will be 75% smaller than it was before. You can compensate by changing the screen resolution if things look too small. If you work at 1024 x 768, change to 800 x 600. Note: you should only do this on a conventional cathode ray tube monitor. LCD monitors don’t run satisfactorily at anything other than their natural resolution – just like pixel fonts – and will anti-alias everything. On an LCD monitor, change the window zoom to 200% to see what you are doing.

Now, you are working at 72 pixels per inch and pixel and points are identical so PSP and Flash will render pixel fonts as they should.

To revert to 96 ppi, just do the same procedure again but choose ‘Normal Size [96 DPI]‘.

Share