Unicode and fonts

12:27PM Oct 30, 2007 in category Emacs by Jason Rumney

Kenichi Handa has been hard at work on a Unicode based Emacs for some years now. For Windows users, there is nothing radical in the default build, a few more languages are supported, and a wider range of Unicode characters, but the Windows specific code has only been updated enough to keep working. In future, optimisations and simplifications can be made due to the internal encodings of Emacs and Windows being both based on Unicode. Messing around with code pages to get fonts displaying will be a thing of the past, and can be already thanks to the new font backend.

While work progressed in parallel on Emacs 22 and the Unicode codebase, there were several other developments happening outside the core Emacs development team. Multiple terminal support (multi-tty) has already been merged with the CVS trunk, though it doesn't mean much to Windows users. Limitations in the way Windows handles console output mean that it is never likely to provide much in the way of new features on Windows, though it may be possible to rid ourselves of the runemacs.exe hack without sacrificing console support using the multi-tty feature.

Another new development was support for X freetype font rendering. On the face of it, this doesn't seem to mean much to Windows users either, but after being merged with the Unicode branch, it has been refactored into a new font backend design, with better support for unicode fonts. No longer are fonts defined by their character-set, Emacs can make use of font meta-data to determine which Unicode subranges each font supports. Currently the font backend is not enabled by default, but has to be enabled with a configure option. A backend has been implemented for Windows native fonts, and is ready for testing.

  • Checking out the Unicode branch:
    cvs -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co -r emacs-unicode-2 emacs
  • Building Emacs with font backend support:
    cd emacs\nt
    configure --enable-font-backend
    make bootstrap

Future work

The new font backend is noticeably slower on Windows. A lot of this is probably down to the fact that the old font code cached the font metrics for ASCII characters of fixed width fonts, whereas the new font backend does no such caching yet. We can probably do a better job of caching by calculating which ranges of characters the fixed width applies to, rather than just ASCII. We might even allow multiple such range/width combinations to be associated with a font, to speed up CJK text display (where characters in the font are one of two widths).

There is no support for BDF fonts in the new font backend. BDF fonts will be given their own font backend, hopefully mostly reusable on other platforms.

A Uniscribe font backend may be introduced to enable some of the more advanced layout features in Windows XP and later. The new font backend design makes it easier to add new support like this without complex dynamic loading logic to support older versions of Windows.

Comments[0]

Time to think

02:34PM Oct 23, 2005 in category Technology by Jason Rumney

With Chizuko and Arata in Japan for the last 2 weeks, I've had a lot of time to catch up on where the industry is and do some thinking about projects of my own that might have some potential. I've been up late reading specs, and trying out new software. Flock has introduced me to social bookmarking, something that sounded like a fad to me before, but with it built into the browser, I am finding it useful, if only to keep my bookmarks in sync between the different PC's I use.

The other main features of Flock are a built-in RSS aggregator, but it is not as good as BlogBridge which I've also discovered recently, and a built in blogging client, which looks suspciously like Qumana, but does not work with Roller, so is useless to me. Qumana on the other hand does work with Roller, but not with non-Latin languages, so for now I'm sticking with the web based "editor" built into Roller.

Part of the thinking about projects I could start has been thinking of names. The main criteria is whether a domain name is available. I thought briefly about placing dot's strangely, a la del.icio.us, but then I thought of the first site I'd heard of that did that - goatse.cx (not linked for a reason!), which put me off that idea. If I hadn't been put off already, I would have been today, after reading about the upcoming social bookmarking site ma.gnolia.com. Too much bandwagon jumping for me, and with the .com on the end they seem a bit confused about whether they want to be a hip Web 2.0 co.mpa.ny or a so last millenium dotcom. I'm sure the VCs are banging down the doors.

Looking at the latest buzz around Web 2.0, my impression is that tagging is to the Semantic Web what the web (or HTML) is to Xanadu. Its the inferior technology that comes along much later and steals your thunder. Its a simpler idea, and is here now and gaining mindshare quickly.

Comments[2]

Boys' Toys

12:30AM Oct 13, 2005 in category Technology by Jason Rumney

With Chizuko and Arata away, I have spent the last week stocking up on "toys" of my own. A new hard drive for the web server, which has dropped the background noise in the spare bedroom by several decibels, as well as giving us plenty of space to backup Arata's photos and videos to. A bluetooth headset for my phone (which I got as an upgrade last month), and a spare charger for it. The last two items have highlighted a trend. USB is becoming the new standard for power cables.

I deliberately ordered a travel power supply for the phone, as I'm going to Japan at the end of the month to chaffeur my family home, and to New Zealand for Christmas. I need a spare charger, as I'm forever going to work with an almost flat battery and not realising until I get there. The contents of the package were a USB to Ericsson cable (to charge from a PC), a car cigarette lighter to USB adapter, and a mains to USB adapter with clip on US, Euro and UK plugs. No NZ plug, but I'm sure I can find a PC or car when I'm there.

The bluetooth headset, I also intend to try out with my PC for Skype. Chizu complained that she couldn't hear properly last time I called, and forced me back to a real telephone, so hopefully the headset will do better than the built in microphone of my laptop. It also came with a USB charger, plus a mains and car charger, but they weren't smart enough to leave the cables off those and put a USB socket there instead. I guess I'll just use the USB cable and the adapters I got with my phone.

As for the phone itself, its a Sony Ericsson V800. I got a 3G phone, not so I can waste vast amounts of money downloading video and music from Vodafone, but so I can roam in Japan. The guy that sold it to me was a bit disappointed I think when I declined an "upgrade" to one of their 3G price plans for the bargain price of £40/month. "But it comes with free video, you'll have to pay lots more if you stay with your current plan", "Not if I don't download video". "But you get 200 minutes of calls and 300 free text messages a month", "I don't even use the 25 free minutes and 50 free text messages I get now". I guess his eyes lit up when I asked for a 3G phone straight away, but he ended up having to do the sales pitch in vain in the end.

As an MP3 player, its rubbish. You can't use any headphones other than the handsfree kit that came with it because of the stupid Arata on the train non-standard plug. After 3 uses, there's already a broken wire in there somewhere and the sound comes and goes from my left ear as I walk. The sound is flat and lifeless, and having listened to the same tracks on a Gizmondo with decent headphones, I know its not just badly encoded MP3s.

As a camera, its not bad. Not good either, but better than I expected. In low light the pictures get very noisy, and despite having the brightest LED spotlight of any phone I've seen, they're not bright enough to eliminate the noise. In decent light though, the pictures are OK. Probably comparable to the cardboard throwaway cameras you buy when you're normal camera breaks or gets left behind, but you just have to take some pictures.

My internet usage has gone up slightly, but its still well within the free allowance that I get pooled with the text messages. I've set up a SyncML server, so I can take a backup of my phonebook whereever I am (I could have used Vodafone's server for this like everyone else, but setting up my own was more fun, and I'm always suspicious about giving out my entire contact list to some third party to use for marketing purposes). It is slightly better browsing the web than my old GPRS phone, as long as there's a 3G signal, but its still pretty painful, especially if you have to type something. I set up the email to check my work account, but I mostly get spam, so I don't think I'll get much use out of that.

I might have to revisit the Java midlet I wrote a while ago, based on an idea that Chizu had for an alarm clock. At the time I found that my phone didn't support enough of the Midlet 2.0 spec for it to work, but hopefully, 2 years on, J2ME implementations have improved.

You might have noticed the addition of a "Mobile" category at the top of the page. I almost got the phone set up for mobile photo-blogging. Almost. Actually its the server that's still a problem.

Comments[0]

New VeriSign Code Signing Certificate and old signtool.exe

10:42AM Jul 07, 2005 in category Technology by Jason Rumney

Our code signing certificates at work expired recently, and we got new ones from VeriSign. The IE cab file signing works fine, but jar file signing was failing. We sign our jar files with the old signtool.exe from Netscape, because the resulting jar works on the old version of Java shipped with Netscape 4.x, as well as the newer plugins.

I quickly diagnosed the problem to be an updated VeriSign CA certificate that the old signing tools did not recognize. Our new certificate was signed by VeriSign Class 3 Code Signing 2004 CA, which from the name, you'd guess has been in use for only the last 6 - 18 months.

Having diagnosed the problem, the solution seemed simple. Install the new CA certificate into signtool's certificate registry, and we're done. So I set about trying to find the CA certificate. This proved far more difficult than it should be, and is the reason why I decided to document this experience so others could benefit.

Clicking around VeriSign's website turned up nothing useful. Any parts of the site that looked like they might contain relevant information quickly took me to a form to enter all my details so a representative could contact me. I don't want to be annoyed by phone calls and emails from your sales droids, VeriSign, I already have a certificate, I just want it to work!

Next step was a google search. One article I found pointed me to the root certificate download on VeriSign's site, which sounded promising, but alas, the Root certificate zip file did not contain the Code Signing 2004 CA.

Eventually, I gave up searching, and started to look more closely at what I had received from VeriSign. I had a Microsoft Code Signing certificate that worked, and a Netscape Object signing certificate that didn't. I opened up IE, and had a look at the certificate that had been installed (Tools menu/Internet Options, Content, Certificates). On the Details panel, I found what I had been looking for. One of the details is labeled Authority Information Access. Under there, was a URL for downloading the CA certificate. After downloading that in Netscape, my code signing is now working again.

Comments[0]

More XP SP2 problems

02:04PM Sep 18, 2004 in category Technology by Jason Rumney

Not only Chiko's laptop is having major problems with XP SP2. It seems mine is now getting a bluescreen error in arp1394.sys (firewire driver) every time I suspend it. I've been doing a lot of overnight compiling and downloading (latest Debian DVD's which took about 3 days to download) lately, so it took me a while to notice this. Two out of two computers with major problems after installing SP2. Just how much testing did Microsoft put this through? I'm thinking of sending them an invoice for the time I've wasted so far getting Chiko's PC back into a usable state.

Update 3/10/2004: As noted in the comments, the cause of the problem turned out to be Kerio Personal Firewall 4.1.0, which I'd upgraded to shortly after installing SP2. If you've found this page through Google because you are having the same problem, and have Kerio installed, try upgrading to 4.1.1 (or later if a newer version has come out by the time you read this).

Comments[12]

Windows XP SP2 Network Problems

10:07AM Sep 17, 2004 in category Technology by Jason Rumney

Chizuko's laptop finally picked up XP SP2 off the Windows Update site on Wednesday night. I'd updated mine about a month ago, using the manual download, but after the minor problems I'd had with it (mostly due to it not detecting Kerio Firewall, and installing its own) I decided to leave hers for the Windows Update version.

After the update (again, I had to manually disable Windows Firewall because it did not detect Kerio), her PC was unable to load any web sites. Actually, that's not quite true. It loaded Google, so I knew her wireless card was working, but nothing else. I started trying to search for problems on Google, and using the Google cache to read them, but eventually I wanted to follow further links, so I grabbed my laptop and worked with one on each knee. None of my searches turned up anything relevant so I decided to document my findings here.

Because I could reach Google, I knew that the basic hardware and driver level of the network was working. I also figured out that DNS resolution was working for all sites. Knowing a bit about networking (what is the average user to do in this situation?) I suspected MTU problems. After searching for the method of changing the MTU, I set hers to 1452 (a number I pulled out of a hat, actually it was the lowest of several values I saw being recommended for people having DSL problems). After a reboot, everything was working happily again.

So what is different between my laptop, which worked, and hers that didn't?

  • Mine: XP Pro, Hers: XP Home
  • Mine: TI ACX100 based wifi card, Hers: Prism GT based Dlink DWL-G650 wifi card

Other things that might be relevant:

  • Access point is a Linux box with an Atheros based Dlink PCI card running the madwifi drivers in master mode.
  • Access to the internet is via a DSL modem connected to the Linux box, using PPPoA, and an MTU of 1500 (default).
  • Laptops are using a private address space (10.0.0.0/8) and the Linux box is NATing them to a static IP.

I don't know which of those is the key to the problem, but I'd say the wireless card is most likely. All I do know is that mine works with the default MTU (1500), as did hers before SP2 was installed. I guess I could try swapping the wireless cards, but I'll have to dig up the driver disks.

Comments[2]

XAML, XUL, plain HTML, what is the future?

10:04PM May 27, 2004 in category Technology by Jason Rumney

On June 1st, W3C are running a workshop on Web Applications and Compound Documents. Some of the participants seem to think the two are linked, and it is no surprise to see it is being held at Adobe's offices, given their interests in pushing PDF (Compound Documents) Forms (Web Applications) as the platform of the future. Adobe's vision of a future of applications built on Compound Documents seems as absurd to me as Macromedia's vision of a future of applications built on Vector Animations.

Mozilla seems to have forgotten about XUL and, teaming up with Opera, proposes a future set firmly in 1997 where Mozilla and Opera strive for the goal of making DHTML/Javascript applications designed for the benchmark IE6 work properly on their respective browsers. Or not.

Microsoft's two position papers strike me as arrogant. With no substance, they might as well have just said We're Microsoft, give us a place at your workshop. Or else.

Most of the submissions talk about Compound Documents, which don't interest me so much, and a few of them seem to get sucked into making tenuous links between Compound Documents and Web Applications without substantiating them. I guess they just felt as confused as I do about the lumping of the subjects together and felt the need to appear knowledgable.

Origo seem to get it with respect to part of what we are trying to do with Altio. Reduced need for procedural code. Most proposals for the RIA (rich internet application) platform of the future retain ECMAscript (Javascript, ActionScript, whatever else you want to brand it) as the main way of providing richness. UI designers don't make good procedural programmers, and procedural programmers don't make good UI designers. We need to separate these tasks, and that means getting rid of the need for scripting altogether for most common UI use-cases. Then again, Origo goes on to talk about how great XForms is, so maybe they don't completely get it. XForms look great when you put it next to HTML, but it isn't rich enough for developing a real interface without writing dreaded procedural code to run the UI.

I had to laugh at the title of Laszlo's submission: The Future of the Web is not the Past of Windows. I thought for a minute they were going to launch into an attack XAML's obvious origins as a thin XML layer over MFC (AKA a thin C++ layer over the Win32 API). But sadly they are just pushing Macromedia's applications as Vector Animation bandwagon. Standard Widgets? We don't want standard widgets, we want graphic designers who make every app look and feel completely alien compared with everything you've used before. Pretty, yes. Practical, no. They have their place in advertising, games, marketing, interfaces that are fairly straightforward and difficult to get lost in, but for serious business apps, sorry but we need standards.

Comments[1]

Font Dialog for X

12:01AM Jan 30, 2003 in category Emacs by Jason Rumney

This is a work in progress that I started some time ago, but haven't had much time for lately. Richard Stallman doesn't like the set-font-for-face-at-point interface, and wants it to work more like a word-processor where you change the font of some text, without other text in that face changing, and without needing to know about faces.

Comments[0]