42. A computer readable medium encoded with a computer program the computer program comprising instructions that when executed by a programmable processor of a computer cause the programmable processor to perform operations comprising: obtaining an electronic document in a memory of the computer, the electronic document including text defined by a string that includes one or more references, each reference representing a character in the text; parsing the string in the memory to identify a reference, the reference representing a first character in the text; based on the identified reference, identifying a glyphlet, the glyphlet being a data structure embedded in the electronic document and stored with the electronic document in the memory including both a set of one or more character attributes defining semantic information of the first character and a set of one or more glyph attributes defining appearance information from which a glyph image of a glyph representing the first character can be rendered, the glyph attributes including all the information necessary to render the glyph image; and using one or more character attributes or glyph attributes for the identified glyphlet to process text in the electronic document, including instructions operable to cause a programmable processor to use the set of character attributes of the glyphlet to process semantic information of the first character and instructions operable to cause a programmable processor to use the set of glyph attributes of the glyphlet to process appearance information for a visual representation of the first character.
54. The computer readable medium encoded with the computer program of claim 42 , wherein using one or more character attributes or glyph attributes for the identified glyphlet to process text in the electronic document comprises: using the semantic information defined by the one or more character attributes to perform a find and replace text processing operation on the electronic document, where at least one string included in the electronic document is replaced with a modified string.