Page 155 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 155

Exposure to Computer Disciplines



                   Notes         to that used to store digital video data. Once encoded, the audio data can then be written to disk
                                 as a raw digital audio data stream, or, more commonly, stored using an audio file format.
                                 Audio file formats are identical in concept to graphics file formats, except that the data they store is
                                 rendered for your ears and not for your eyes. Most formats contain a simple header that describes
                                 the audio data they contain. Information commonly stored in audio file format headers includes
                                 samples per second, number of channels, and number of bits per sample. This information roughly
                                 corresponds to the number of samples per pixel, number of color planes, and number of bits per
                                 sample information commonly found in graphics file headers.
                                 Where audio file formats differ greatly is in the methods of data compression they use. Huffman
                                 encoding is commonly used for both 8-bit graphical and audio data. 16-bit audio data, however,
                                 requires algorithms specially adapted to the problems of compressing audio data. Such
                                 compression schemes include the CCITT (International Telegraph and Telephone Consultative
                                 Committee) recommendations G.711 (uLAW), G.721 (ADPCM 32) and G.723 (ADPCM 24), and
                                 the U.S. federal standards FIPS-1016 (CELP) and FIPS-1015 (LPC-10E).

                                 Because audio data is very different from graphics data, this book does not attempt to cover
                                 audio file formats.

                                 7.3.13 Font Formats

                                 Another class of formats not covered in this book are font files. Font files contain the descriptions
                                 of sets of alphanumeric characters and symbols in a compact, easy-to-access format. They are
                                 generally designed to facilitate random access of the data associated with individual characters.
                                 In this sense, they are databases of character or symbol information, and for this reason font
                                 files are sometimes used to store graphics data that is not alphanumeric or symbolic in nature.
                                 Font files may or may not have a global header, and some files support sub-headers for each
                                 character. In any case, it is necessary to know the start of the actual character data, the size of each
                                 character’s data, and the order in which the characters are stored in order to retrieve individual
                                 characters without having to read and analyze the entire file. Character data in the file may be
                                 indexed alphanumerically, by ASCII code, or by some other scheme. Some font files support
                                 arbitrary additions and editing, and thus have an index somewhere in the file to help you find
                                 the character data.

                                 Some font files support compression, and many support encryption of the character data. The
                                 creation of character sets by hand has always been a difficult and time-consuming process,
                                 and typically a font designer spent a year or more on a single character set. Consequently,
                                 companies that market fonts (called foundries for reasons dating back to the origins of printing
                                 using mechanical type) often seek to protect their investments through legal means or through
                                 encryption. In the United States, for instance, the names of fonts are considered proprietary,
                                 but the outlines described by the character data are not. It is not uncommon to see pirated data
                                 embedded in font files under names different from the original.

                                 Historically there have been three main types of font files: bitmap, stroke, and spline-based
                                 outlines, described in the following sections.

                                 We choose not to cover font files in this book because font technology is a world to itself, with
                                 different terminology and concerns. Many of the font file formats are still proprietary and encrypted
                                 and, in fact, are not available to the general public. Although there are a few older spline-based
                                 font formats still in use, font data in the TrueType and Adobe Type 1 formats is readily available
                                 on all the major platforms and is well-documented elsewhere in publications readily available
                                 to developers.




        148                               LOVELY PROFESSIONAL UNIVERSITY
   150   151   152   153   154   155   156   157   158   159   160