Archive for the ‘Webtechnology’ Category

No Comments

HTML5 Webfonts woes: redefining standard fonts

Tuesday, September 29th, 2009

What happens if you redefine a standard font with a new html5 webfonts font-face css property?

Second question: is it case-sensitive?

Answer: as you could guess, it depends of the implementation of vendors. Defining standards is one thing, defining  error handling is a bigger and perhaps even more important challenge.

Here we gonna redefine the verdana font with the Pinewoord webfont, and define a Pinewood and a pinewood font based on different fonts:


<style scoped>
@font-face {
font-family: verdana;
src: url(http://dev.webonomic.nl/fonts/Pinewood.ttf);
}

@font-face {
src: url(http://dev.webonomic.nl/fonts/Pinewood.ttf);
font-family: 'pinewood';
}
@font-face {
src: url(http://dev.webonomic.nl/fonts/Pinocchio.ttf);
font-family: 'pinewood';
}

</style>

Paragraph with Verdana font

Nec tristique scelerisque, fringilla, cras eget proin. Fames, justo. Dui nisl ad nisi orci lectus curabitur scelerisque vitae. Metus tortor, scelerisque. Adipiscing tellus orci, magnis. Maecenas nullam. Eleifend. In, at enim habitasse dictum, lacinia, auctor.

Paragraph with Pinewood font

Nec tristique scelerisque, fringilla, cras eget proin. Fames, justo. Dui nisl ad nisi orci lectus curabitur scelerisque vitae. Metus tortor, scelerisque. Adipiscing tellus orci, magnis. Maecenas nullam. Eleifend. In, at enim habitasse dictum, lacinia, auctor.

Paragraph with pinewood font

Nec tristique scelerisque, fringilla, cras eget proin. Fames, justo. Dui nisl ad nisi orci lectus curabitur scelerisque vitae. Metus tortor, scelerisque. Adipiscing tellus orci, magnis. Maecenas nullam. Eleifend. In, at enim habitasse dictum, lacinia, auctor.

Firefox 3.5 and Safari 4.0 will redefine the Verdana font and render the Verdana and Pinewood font the same.

Opera 10 will stick to the standard font Verdana and will ignore the new definition.

All browsers treat the font-face case-insensitive, there are no differences in the rendering of both Pinewood paragraphs.

Chrome doesn’t render any webfonts in this example by default.
It should be started with the commandline switch: –enable-remote-fonts

I would say Opera’s behaviour is wrong:
Specs state:

If the font family name is the same as a font family available in a given user’s environment, it effectively hides the underlying font for documents that use the stylesheet. This permits a web author to freely choose font-family names without worrying about conflicts with font family names present in a given user’s environment.

No Comments

Dual Monitor setup for Dell 5150, Ubuntu 9.04 with ATI X600

Wednesday, September 9th, 2009

We need to see a lot these days now the Golden Age of Television meets the Platinum Age of Internet; hundreds of television channels and billions of webpages. Sure I have a remote control and started tabbed browsing since ages (Opera in 2000), but we’re absolute in the need of dual screens now: better, easier and they will raise productivity!

My old 17 inch CRT died. I took the step and bought a 22 inch 1920×1080 TFT to replace it . My first 19 inch 1280×1024 became second. A hefty 3200×1080 desktop in sight. Wow!

But could I get it working on my ordinary Dell with ATI X600 and Ubuntu?

A quick look on the ATI website said, that 1920×1080 was only supported under Windows (XP/Vista). I didn’t take that serious.

Never knew why all hardware vendors are promoting Windows, but it’s a fact, they probably get paid for it. Of course they lie: 3200×1080 is supported out of the box by Ubuntu 9.04 with default drivers, no extra proprietary ATI drivers needed.

Setting up was quite easy but not 100% trivial, here is how I did it:

  • delete all settings in /etc/X11/xorg.conf. It’s a textfile and can be understood by humans, there isn’t much in it these days, just some virtual desktop settings, you can’t get wrong.
  • enable both screens in `system -> preferences -> display` and drag them to right position.
  • uncheck `mirror screens`

Somehow my second monitor was still black. I could mirror the screens but a virtual desktop did not work. If the same happens to you, a few extra steps.:

  • edit /etc/X11/xorg.conf
    [sourcecode language=’shell’]
    sudo gedit /etc/X11/xorg.conf
    [/sourcecode]
  • Make your file look like:
    [sourcecode language=’shell’]
    Section “Screen”
    Identifier “Configured Screen Device”
    Device “Configured Video Device”
    SubSection “Display”
    Virtual 3200 1080
    EndSubSection
    EndSection
    [/sourcecode]
  • Open a terminal and run: [sourcecode language=’bash’] xrandr [/sourcecode]
  • Note the ID of your monitors (in my case DVI-0 and second VGA-0). Run
    [sourcecode language=’shell’]
    xrandr –output VGA-0 –mode 1280×1024 –right-of DVI-0
    [/sourcecode]

The second monitor got active and did after rebooting. That was all. Only desktop eye candy by Compiz is not supported because 3D rendering is hardware limited by ATI to max 2054px. I can live with it; no shades or transparency makes my computer faster.

No Comments

HTML 5 and internal datepicker

Sunday, August 2nd, 2009

As pointed out in an earlier post, HTML5 and the webfont CSS @fontface property will phase out the need for font replacement techniques like sIFR or Cufon.

And another popular javascript driven UI-aid is gonna deprecate soon. The date-picker or calendar tool.

HTML5 that now incorporates the Webform2 specification which has internal support for a calendar tool, range slider and number spinners.

HTML5 datepicker rendered by Opera 10

HTML5 datepicker rendered by Opera 10


Opera is the only browser that has support for Webform now for several years. I made some internal tools that used it.

It so simpel and powerful. And no more localisation issues.

Some examples (need Opera 9+ to see)
With other HTML5 nonsupporting browsers it will degrade to an ordinary input field.

Datepicker

[sourcecode language=’xhtml’]

[/sourcecode]

Email

[sourcecode language=’xhtml’]

[/sourcecode]
*Note the automatically added special email icon in Opera

Number (with automatic spinner)

[sourcecode language=’xhtml’]

[/sourcecode]

Range (slider)

[sourcecode language=’xhtml’]

[/sourcecode]
Default range: 0 – 100. I guess this will be another UI favourite.

No Comments

Try your Webfont on this blogpost

Monday, April 13th, 2009

You can try the font here. Enter the url of the .ttf font-description.

See the font in bold. Wow xut lazy fox: Vitae, laoreet eros at sociis. Aliquam, eros, nonummy. Felis pretium blandit, luctus mi praesent egestas, tortor cubilia. Augue, est adipiscing. Fames, ve tristique magna fames. Ac ligula. Taciti augue rhoncus sagittis. Bibendum magnis, cum mi auctor. Euismod ut, purus. Sociis augue, ve, phasellus risus suspendisse placerat. Dis risus. Risus.

And in italic. Also very nice. Erat feugiat, rutrum. Ac cras ve tempor. Parturient dis, risus tempor natoque. Natoque amet quis hymenaeos nonummy, consectetuer consequat montes. Quisque non, turpis natoque class potenti feugiat, quisque hac. Nibh lacinia, donec, porta euismod enim viverra aptent. Fermentum amet viverra purus hymenaeos integer.

Is a strikethrough available? Vestibulum metus imperdiet justo augue. Tellus, etiam mi, magnis magna, aliquet nulla at mollis. Amet, hymenaeos ridiculus. Imperdiet bibendum, dictum ad ve duis erat nisi odio. Pharetra posuere libero quam laoreet commodo diam mi conubia. Curae. Pellentesque. Adipiscing. Et torquent pretium, nullam arcu, ullamcorper ultrices. Ac laoreet. Vitae. Ultricies leo, suspendisse fusce, fames. Accumsan etiam, mus laoreet.

Edit this alinea yourself (click and type)

Vestibulum metus imperdiet justo augue. Tellus, etiam mi, magnis magna, aliquet nulla at mollis. Amet, hymenaeos ridiculus. Imperdiet bibendum, dictum ad ve duis erat nisi odio. Pharetra posuere libero quam laoreet commodo diam mi conubia. Curae. Pellentesque. Adipiscing. Et torquent pretium, nullam arcu, ullamcorper ultrices. Ac laoreet. Vitae. Ultricies leo, suspendisse fusce, fames. Accumsan etiam, mus laoreet.

3 Comments

Webfonts easy to use: no need for sIFR

Thursday, April 2nd, 2009

Webfonts is a technique for defining a variety of fonts to be displayed in a web browser.

In CSS authors typically specify font characteristics via a font property (font-family). In CSS1, all fonts were assumed to be present on the client system and were identified solely by name. Designers of webpages had no way to propose other fonts to the user other than generic default fonts installed on the client computer.

Now with CSS3 the situation, when there is no matching font on the client, has been expanded. Fonts can be downloaded over the web by the browser and used on the client. This gives the author much more control over the typography and design of the page, because it’s not longer dependend of locally stored fonts.

This means this is no need anymore for flash based work-arounds like sIFR. The other good thing is that browsers can fall back to more generic fonts, when they don’t support the webfonts.

So there is no reason at all to wait using them.

Like for most web-innovations based on open standards, Microsoft is NOT supporting it. They have there own implementation based on a proprietary standard EOT. This is not a W3C recommendation nor is it supported by any other company. I think we have to wait till Internet Explorers` marketshare is dropping under 30% before Microsoft is starting to support open standards Web Fonts.

To see this paragraph in a different font, try the appropriate buttons.



You need a webfont supporting browser: Safari 3.1+, Opera 10 +, Firefox 3.1 + or Chrome 2 +.

Comments Off on Lorre says SVG SVG SVG SVG

Lorre says SVG SVG SVG SVG

Saturday, February 21st, 2009

Lorre is now talking SVG to a lot more people:

<object 
data="http://dev.webonomic.nl/wp-content/uploads/2009/02/parrot.svg" 
type="image/svg+xml" 
style="width:300px;margin:0 auto;display:block;">
</object>