# MIME Resources
by Brent Welch

Resources define the set of MIME types that exmh understands. Resources also define the font families used to display messages in various character sets.

mimeTypes
  This lists the Content-Types for which handler procedures are defined. Each of these has a corresponding mime_content/type resource that specifies the Tcl command used to display a part of that type. mimeUTypes is the parallel resource for users to add content types of their own. For example:

            *mimeTypes: image/gif text/plain text/richtext text/enriched multipart/mixed \
                    multipart/digest multipart/parallel multipart/alternative \
                    application/octet-stream message/external-body message/rfc822 \
                    image
            *mimeUTypes:

            *mime_text/plain:               Mime_ShowText
            *mime_text/richtext:            Mime_ShowRichText
            *mime_text/enriched:            Mime_ShowRichText
            *mime_multipart/mixed:          Mime_ShowMultipart
            *mime_multipart/digest:         Mime_ShowMultipartDigest
            *mime_multipart/parallel:       Mime_ShowMultipartParallel
            *mime_multipart/alternative:    Mime_ShowMultipartAlternative
            *mime_application/octet-stream: Mime_ShowApplicationOctet
            *mime_message/external-body:    Mime_ShowMessageExternal
            *mime_message/rfc822:           Mime_ShowRfc822
            *mime_image:                    Mime_ShowImage

mimeCharsets
  A font has a character set, an encoding for the characters. In a MIME Content-Type of text, the charset parameter defines the character set for the text. us-ascii is the basic ASCII charset; it lacks special characters used in many European languages. The iso-8859-1 character set has 8-bit characters and is used to encode accented and other special characters used in Latin-based languages. iso-8859-8 is used for Hebrew. iso-2022-jp is used for Kanji. You need a specialized version of the Tk toolkit to display Kanji. Each charset has two resources associated with it: the registry and the encoding. If you are familiar with X font names, you will recognize the registry and encoding as the last two components of a font specification.

            *mimeCharsets: us-ascii iso-8859-1 iso-8859-8 iso-2022-jp
            *mimeUCharsets:
            *mime_us-ascii_registry:        iso8859
            *mime_us-ascii_encoding:        *
            *mime_iso-8859-1_registry:      iso8859
            *mime_iso-8859-1_encoding:      1
            *mime_iso-8859-8_registry:      iso8859
            *mime_iso-8859-8_encoding:      8
            *mime_iso-2022-jp_registry:     iso8859
            *mime_iso-2022-jp_encoding:     *

mime_`charset`_plain_families
  A font has a family that determines the basic look for the font -- for example, times or helvetica. Each of the family resources is a list of families that are tried, in order, to find a font supported by the X server. The plain family resource lists a set of font families used for ordinary text/plain messages.

            *mime_us-ascii_plain_families:    fixed clean lucidatypewriter courier terminal
            *mime_iso-8859-1_plain_families:  lucidatypewriter fixed courier terminal
            *mime_iso-8859-8_plain_families:  fixed
            *mime_iso-2022-jp_plain_families: fixed

mime_`charset`_fixed_families
  The fixed families are used to display fixed-width fonts. "Fixed" is one of the types allowed by text/enriched contents.

            *mime_us-ascii_fixed_families:    lucidatypewriter fixed clean courier terminal
            *mime_iso-8859-1_fixed_families:  lucidatypewriter fixed courier terminal
            *mime_iso-8859-8_fixed_families:  fixed
            *mime_iso-2022-jp_fixed_families: fixed

mime_`charset`_proportional_families
  The proportional families are used for text/enriched.

            *mime_us-ascii_proportional_families:   times "new century schoolbook" \
                                                    lucidabright charter lucida helvetica
            *mime_iso-8859-1_proportional_families: times "new century schoolbook" \
                                                    lucidabright charter lucida helvetica
            *mime_iso-8859-8_proportional_families:
            *mime_iso-2022-jp_proportional_families:

mime_`charset`_title_families
  The title families are used for menu and section titles.

            *mime_us-ascii_title_families:   times "new century schoolbook" \
                                             lucidabright charter lucida helvetica
            *mime_iso-8859-1_title_families: times "new century schoolbook" \
                                             lucidabright charter lucida helvetica
            *mime_iso-8859-8_title_families:
            *mime_iso-2022-jp_title_families:

mimeExtMethods
  This resource lists the set of external access methods for message/external-body MIME parts. For each of these methods, a corresponding resource lists the Tcl command that handles the access method.

            *mimeExtMethods:        local-file anon-ftp
            *mimeUExtMethods:
            *mime_local-file:       MimeLocalFileTransfer
            *mime_anon-ftp:         MimeFTPTransfer