See the features character portraits have divided into these sections: Hair, Ears, Nose, Forehead, Chin, Mouth and Eyes. Give every feature different looks, and number these looks. You will have a table wich looks somewhat like this:
Hair a b c d e f g h
Ears a b c d e f g h
Nose a b c d e f g h
Forehead a b c d e f g h
Chin a b c d e f g h
Mouth a b c d e f g h
Eyes a b c d e f g h
or something, and then when you want to decide how the character looks you put each of these letters in a order, with, in this example, the first letter represents the hairstyle, the second the ears and so on:
b,c,h,e,a,a,b
and your character will look in a certain way.
No doubt this is done differently, but this is the principle atleast. If I remember correctly there was a player-made programme wich let you see how a certain combination of letters would make your character look. Can't search the forum for a link though.