2011-11-19

How to install FontForge on Mac OS X Lion

Since I got some old font files before 2007 and I wanna use them, after some inspection, Font Magager told me that the name tables of the fonts are mssing. In order to add them manually, I googled a while to find out FontForge can do the job.

Now comes the problem. FontForge is open source and doesn't provide any compiled binary for Mac OS X ab 10.6. That means, one must complie it before it can be used. So after a little searching again, I found Garrick's guide [How to install fontforge on mac os lion]. Sadly, the process he used doesn't work for me.

He suggests that it can be done easily with the commands:

brew install fontforge
sudo brew link fontforge

The first command returns some fatal errors:

Error: Failed executing: make install
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/7658
https://github.com/mxcl/homebrew/issues/8144
https://github.com/mxcl/homebrew/issues/8491

Then the answers in those issues suggest:

brew install cairo --use-clang

I tried

brew install fontforge

after successful execution of that command. Then it came with:

Error: Failed executing: make
If `brew doctor' does not help diagnose the issue, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue

According to the message, I ran the command:

brew doctor

The result was:

Unbrewed dylibs were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libfaac.0.dylib
/usr/local/lib/libfreetype.6.dylib
/usr/local/lib/libical.0.0.0.dylib
/usr/local/lib/libicalss.0.0.0.dylib
/usr/local/lib/libicalvcal.0.0.0.dylib
/usr/local/lib/libltdl.3.1.0.dylib
/usr/local/lib/libmp3lame.0.dylib
/usr/local/lib/libmp4v2.0.dylib

Unbrewed static libraries were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libdevkit.a
/usr/local/lib/libical.a
/usr/local/lib/libicalss.a
/usr/local/lib/libicalvcal.a
/usr/local/lib/libkld.a
/usr/local/lib/libltdl.a
/usr/local/lib/libredo_prebinding.a

Unbrewed .la files were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libical.la
/usr/local/lib/libicalss.la
/usr/local/lib/libicalvcal.la
/usr/local/lib/libltdl.la


So I deleted all the above mentioned files manually and executed the command again.

brew install fontforge


The result:


Error: Failed executing: make
If `brew doctor' does not help diagnose the issue, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue


Very luckily I saw a warning before the compiling errors, that reads:

Warning: Building with LLVM, but this formula is reported to not work with LLVM:

Compiling cvexportdlg.c fails with error: initializer element is not constant

We are continuing anyway so if the build succeeds, please open a ticket with
the following information: 2336-10.7. So
that we can update the formula accordingly. Thanks!

If it doesn't work you can: brew install --use-gcc


So I tried the command again:

brew install fontforge --use-gcc

Now Mac OS X Lion lets me compile FontForge endly.

In conclusion, the right commands to compile FontForge on Mac OS X Lion should be:

brew install cairo --use-clang

brew install fontforge --use-gcc


In order to see FontForge in Application folder, you need to run this command:

ln -s /usr/local/Cellar/fontforge/20110222/FontForge.app /Applications

2011-11-14

iOS BUG: Synced music won't appear in iPod or Music App

Yesterday I've updated my iPhone 3GS by the means of OTA (Over The Air) to the newest firmware iOS 5.0.1. Everything runs smoothly, BUT! After I open the supplied Music App, I've seen only a very little part of my music collection? Where did they go?



Firstly I thought the update deleted my not-from-itunes-store-bought music files, then I checked the iTunes, the status bar of my iphones indicates that there are exactly 13.6GB music files on it. It appears that the mediathek file on the iphone has corrupted with the update, or maybe the update has changed the structure of the mediathek file and forgetten to update it.

What can I do? Sure, completely restore is one way but also the last way I wanna go. So I've googled around for a while to find out a better and smart way to correct it. Then I found this article [iOS 4.2 bugs: iPhone music gone after the update? Here’s the fix! ]. Okay, i am not the only one and iOs 5.0.1 is also not the only one with that bug.




  1. Grab your cable and plug your iPhone into iTunes on your Windows or Mac PC


  2. When your iPhone shows up in the sidebar, make sure you can see the content listings beneath it (click on the triangle to the left if not)


  3. Click on music


  4. Pick a song


  5. Play it in iTunes


  6. Sync your iPhone


The method in that article didn't work for me for the first time. I have to figure out why it doesn't work. The reason behind that method is: Change the play count for a song, then iTunes changes the mediathek file on the iPhone.

So it is very important for that method, just try to play a song and maybe you can forward it very quickly to the end, make SURE that the play count of that song changed and resync!

Things are gonna be alright and we don't know when apple will fix that long-lasting bug.

2011-11-10

Goodbye, Flash on mobile devices!

Now the war is over. Adobe has declared that they abandon the development of Flash on mobile devices. The winner is HTML 5.

Like Google has mentioned before, the future of Internet belongs to the browser. If we think it further, in the future there should be at least one browser on one device, that means, developers should consider how and what information should be delivered, but not on what kind of devices will support it.

In other word, HTML 5 won this war just because one of its properties, "once programmed, run everywhere". Sounds familiar, right? Sure, it is the slogan of Java.

In my opinion, the device in the future should have some CSS rules to let the end user know what kind of mobile device they use. Take Mobile Safari as an example, its UI elements on a website without CSS are looked exactly like an app on a iPhone.

Now the day is coming, are you ready for the changing?

2011-11-04

Fix the problem with Captive Network under Mac Lion 10.7.2

The Auto Logon Window for Captive Network in Mac OS X Lion is very handy, but with the update 10.7.2 there are so many problems with such a feature happened. Sadly I have to use the IE in my VM Windows to get me logged in.

Now here is the solution:

Use Terminal or Text Editor to edit the file /etc/hosts and add the following lines to the end:

127.0.0.1 crl.usertrust.com
127.0.0.1 ocsp.usertrust.com
127.0.0.1 crl.incommon.org
127.0.0.1 ocsp.incommon.org
127.0.0.1 crl.comodoca.com
127.0.0.1 crl.comodo.net
127.0.0.1 ocsp.comodoca.com

After that, the DNS cache must be cleared with Terminal Command:

dscacheutil -flushcache

Log off and log on, you will see the missing feature again under Lion 10.7.2.


The reason:

With the update 10.7.2 Lion has made some errors on CSL certificates, especially on some captive networks that need the user wait for a few seconds.

Enable AirDrop on older Macs

We all know that Apple has disabled the useful function AirDrop on its older Macs. Now with some work in Terminal, you can enable AirDrop for many older Lion systems at the Terminal command line. Enter:
defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1

After setting the defaults, A restart of Finder will be necessary:

killall Finder

Once you do, you will see the AirDrop icon on the left panel of Finder.