When writing code here and then, you usually use a monospaced font for better alignment of the characters. The default in Windows is Courier New which is quite readable, but its characters are a bit wide.

My favourite so far has been Lucida Console which comes with Windows XP and maybe Microsoft Office. The fonts characters are a bit less wide than those in Courier New. This is my default-font in Putty as it's very readable (for a monospaced font) and doesn't use as much space as Courier does.

Somewhere on the web, I came across ProFont which is a modified version of Monaco, the mac users have as default monospaced font. ProFont is optimized to be used by programmers, can be set to a very small size (lots of code visible without scrolling) and is very very readable.

On the page you'll find a bitmap and a truetype version. The latter looks quite badly on Windows XP with ClearType and the former doesn't work in Java-Applications. Unfortunatly jEdit is indeed written in Java, so I have to use the TT variant.

Then again, Delphi and Putty are not written in Java, so I want to use the bitmap version.

Unfortunatly, it's not possible to install both fonts at the same time as the are both named the same, so the TT version always wins.

My solution: I've opened the bitmap-font with a hex editor and changed all ocurrences of ProFontWindows to something else which finally allowed me to install both fonts at the same time.

Get the hacked version here. Note that I've only hacked the fontname. All its copyright belong to the author of the page above.

Read on →

Last monday, OmniGroup has released the public BETA version of OmniWeb 5. The most interesting thing I've seen in it (I'm currently writing this entry using OmniWeb) is this text in the EULA:

IMPORTANT - Read this License Agreement carefully before clicking on the "Agree" button. By clicking on the "Agree" button, you agree to be bound by the terms of the License Agreement. -- The document that follows this paragraph is a license agreement. Why do we need such a thing? Well, to be perfectly honest, our lawyers have told us that we need to protect ourselves. We at The Omni Group pride ourselves on our low-key style, but the global nature of the software business means that one lawsuit from one user in a far-flung jurisdiction could put us out of business. It also means that, without this agreement, we might not have protection from people who misuse our software. We do not want to bet our entire company on such possibilities, however unlikely, because we like doing what we do and want to continue to be able to do it. And, so, we require you to read and agree to this license. We think you will find it quite reasonable. Obviously, if you disagree, click "Disagree." But, don't just stop there. Let us know. Send some e-mail to telling us what you find unacceptable about our license agreement. We can't promise to change anything, but we will do our best to get back to you.

Nice. It's their style, so it does not really surprise me, but it's nice anyway.

What I like is this tab-drawer. I've just seen that even the bookmark-window is displayed as a tab. Very nice. Very integrated.

omniweb_textarea.png

In the stauts bar there are some Icons. I don't really understand what they are doing and there's no tooltip, but I'm sure, this will be fixed in a later release.

Very good-looking. I'm going to surf around a bit and will possibly post something more later on.

Just before hitting "submit", I've seen this small plus-sign above the scroll bar on any <textarea>-element. This thing is just great. When you click on it, an extra window will open providing you with a nice large texteditor and the possibility to import any text file. Nice! Very Nice.

I think, I'm going to find a whole lot of nice little things as I continue trying the thing out.

Read on →

When I was looking for a new AV-receiver, I soon found out that my whishes cannot be pleased in common consumer-shops like Media Markt. I found my device by googling.

Where to get it? Although, I am one of those guys that like to go into a store and just take the stuff with me, this was not possible this time as said receiver is quite uncommon (newly on the market and quite expensive [but sounds very nice]), so buying online was my only way to get it.

Browsing around a bit finally lead to dvdupgrades.ch which has the most complicated user interface I've ever seen on a website (and runs only on IE as the JavaScript for the menues at the top is somewhat strange), but looked quite ok anyway.

They promised delivery somewhere around February, 10th, but the stuff was here already yesterday. They've worked fast and professional. Very nice.

If you live near switzerland and need exotic AV-stuffm especially modified consoles or DVD-players (region code, macrovision, ... - they even wrote a new firmware for Pioneer Players from scratch), give them a shot!

Read on →

I'm still into making Delphi apps look more "native" when run under Windows XP. Now that I got the IE-Control working, I was looking into the password-edit case.

The Problem: When using the standard way for creating password edits (Drop a TEdit on the Form and set the PasswordChar property to ° ), this may look and work on in Win 9x, NT and 2000, but under XP, some features are missing:

  • In XP, password-edits cannot be read from other applications by sending the WMGETTEXT message. Delphi's TEdit can.
  • In XP, the edits have a nice bullet instead of a * to mark the entered characters
  • When CapsLock is active, a balloon-hint appears warning the user that maybe she is not doing what she expects

How to fix this?

Simple: Create a descendant of TEdit, override CreateParams and set the controls style to ESPASSWORD. Provided you are supplying a valid Manifest for XP, you now have a fully fledged and nice working password-edit:

procedure TPasswordEdit.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.Style := Params.Style or ESPASSWORD;
end;

Oh. One thing is still missing: The dots look wrong. This is because Delphi does not use Windows' standart font per default but overrides this with "MS Sans Serif" where "Tahoma" is the standard under XP. So Delphi-Apps generally look kind of foreign - even more so, when ClearType is enabled (MS Sans Serif is a bitmap font and cannot be antialiased).

This can be fixed by setting each forms DesktopFont property to true. Note that it's a protected property, so it must me called from withing the form.

Now the bullets look right and the font's in your application are proper anti-aliased (provided ParentFont is set to true in every component on the form).

<img alt="delphipwchar.png" src="http://www.gnegg.ch/archives/delphi_pwchar.png" width="408" height="190" border="0" />

Read on →