Change Font Size and Face

More Technical Info

The font size used on my site scales quite well to your browser's window, and so does the font face used (serif for larger, sans-serif for smaller screens). Still, you may prefer to set your own, custom size and face for viewing wrotniak.net. Why not?

To change the font attributes, use the buttons in the box. You will need to allow cookies and JavaScript (not Java!) from wrotniak.net for this to work! (See the disclosure below.)

The [Custom] font face button allows you to name a particular font face, or you can click on one of the font names listed in the box (see Details for more on that.)

The [Auto] font size button makes the actual size self-adjust every time the window is redrawn or resized. If you don't like the way this is done, just pick a given size.

Note: if you now revisit a page which your browser keeps cached, you may have to refresh the view in order to see the changes.

Disclosure

In order for this to work, my other pages must "know" what your selection was. To have this setting persist from one session to another the page stores a cookie string (two cookies), on your computer. The string contains just two information items: font size and font face.

For example:   fs=13pt; ff="Book Antiqua";  

This information is not shared with any other party or Web site, it also does not contain any data which may be used to identify you.

Obviously, if your browser is set to not accept cookies (check here), your wrotniak.net font settings will be lost next time you visit. All other functionality of the site remains unaffected. Only when you turn JavaScript off, the font size/face selection will stop working.

Many Web sites send you cookies without asking for any permission. Most commercial cookies are used to trace your browsing from one site (or page) to another. I don't do that.

If you wish to erase my cookies from your computer, just click on [Remove Cookies]. Remember that whenever you click on any size or face, the cookie file will be recreated, unless you have disabled cookies for my site.

Details

Font size (points) is selected by clicking on one of the top-row buttons. This is the base size, used to display most of the plain text; all other sizes will be rescaled in the same proportion.

For the font face you may select a generic font type ([Sans] or [Serif]), a particular font by name (the [Custom] button), or one of faces from a fixed list. In the last case, there are two groups:

  1. Windows fonts, distributed with Windows. If you a running a reasonably recent version of Windows (say, 7 and up), you have them and they will work here.
  2. Google fonts — almost a 1000 of those made available on the Internet for free. The browser will get these it needs in the background, and they are kept for a year.

    Don't worry, the process is very easy on your bandwidth; for example, my site requests a total of 7 fonts, or 400 kilobytes of transfer, once a year.

Some fonts may also have additional versions (for example, Compressed or Narrow).

Compatibility

The JavaScript and HTML code have been tested under Windows 7 and 10 on current versions of Firefox, Opera, Vivaldi, Google Chrome, Edge, Safari, and Internet Explorer. It also works with older (2007 or later) versions of these browsers. It will not work on many phone/PDA browsers, which ignore font attributes specified in Web documents.


Home: wrotniak.net | Search this site | Change font size

Photo News | The Gallery


Posted 2008/03/12; last updated 2018/12/24 Copyright © 2008-2018 by J. Andrzej Wrotniak