Abstract:
A method, system and apparatus for locale and operating platform independent font selection. In an operating platform having an operating platform configuration and an associated locale, a locale and operating platform independent font selection method can include parsing a pre-established font properties file to identify whether a desired font referenced in the font properties file supports at least one of the operating platform configuration and the associated locale. Consequently, if it is indicated within the font properties file that the desired font supports either or both of the operating platform configuration and the associated locale, the desired font can be utilized in the operating platform.

Description:
STATEMENT OF THE TECHNICAL FIELD  
       [0001]     The present invention relates to font mapping and more particularly to font selection to support multiple locales and operating systems.  
       DESCRIPTION OF THE RELATED ART  
       [0002]     Fonts refer to the visual appearance of textual characters in a computing environment. Fonts can range from generically applicable serif and non-serif fonts, to specially applicable character sets to accommodate particular visual interface needs such as mathematical equations, quasi-graphical images and characters and icons unique to a particular foreign language. Indeed, the variety of fonts available for use in any one particular computing environment can be substantial and ever expanding as new foreign languages are accommodated within modern operating environments.  
         [0003]     Generally, there are two types of fonts—physical fonts and logical fonts. Physical fonts are the actual font libraries which can include, for example, true type or postscript type one fonts. The physical fonts can include Times Roman, Helvetica, and Courier to name a few. Logical fonts, by comparison, are not actual font libraries. Rather, logical fonts are font-type names recognized within a specific platform such as an operating system, virtual machine or software development environment. Once recognized by the environment, the font-type names can be mapped to a physical font already installed in the platform. Exemplary logical fonts include Serif, Sans-Serif, Monospaced, Dialog and DialogInput.  
         [0004]     The mapping of logical font types and styles to physical fonts is platform and locale specific. Generally, a font properties file can contain the mapping of logical font to physical font. The font properties file can be consulted when initializing the platform and, based upon the mappings of the font properties file, the platform during initialization can create the mapping of logical fonts to physical fonts for use during the duration of use of the platform. In as much as different locales can exist for the same platform and even for different platform versions, multiple font properties files can be created and deployed individually to accommodate each different locale with a locale specific mapping of logical font to physical font.  
         [0005]     Due to the inflexible nature of the basic font properties file, several problems can arise when developing an application for deployment across multiple operating platforms, multiple operating platform versions and multiple locales. First, in many circumstances, a font able to display locale specific text in one operating platform may not be able to display locale specific text in other operating platforms. Second, a font that is capable of displaying the non-Latin text of one locale might not be capable of displaying the non-Latin text of another locale. In both cases, the failure to display locale specific text in a particular operating platform can be due to the absence of perfect developer knowledge of the font rendering capabilities of every conceivable operating platform. The inability of a font to display locale specific text in a particular operating platform also can be due to the inability of runtime logic in the platform to support the selected font.  
       SUMMARY OF THE INVENTION  
       [0006]     The present invention addresses the deficiencies of the art in respect to font mapping for different operating platforms and different locales and provides a novel and non-obvious method, system and apparatus for locale and operating platform independent font selection. In an operating platform having an operating platform configuration and an associated locale, a locale and operating platform independent font selection method can include parsing a pre-established font properties file to identify whether a desired font referenced in the font properties file supports at least one of the operating platform configuration and the associated locale. Consequently, if it is indicated within the font properties file that the desired font supports either or both of the operating platform configuration and the associated locale, the desired font can be utilized in the operating platform.  
         [0007]     A computing system which has been configured for locale and operating platform independent font selection can include an operating platform having an operating platform configuration and an associated locale. The system also can include a font properties file including multiple entries. Each of the entries can define a font and at least one of corresponding supported locale and a corresponding supported operating platform configuration. Finally, the system can include a locale and operating platform independent font selection processor.  
         [0008]     The locale and operating platform independent font selection processor can be programmed first to parse the font properties file to identify whether a desired font referenced in the font properties file supports at least one of the operating platform configuration and the associated locale. The locale and operating platform independent font selection processor subsequently can utilize the desired font in the operating platform if it is indicated within the font properties file that the desired font supports either or both of the operating platform configuration and the associated locale.  
         [0009]     Additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The aspects of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0010]     The accompanying drawings, which are incorporated in and constitute part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. The embodiments illustrated herein are presently preferred, it being understood, however, that the invention is not limited to the precise arrangements and instrumentalities shown, wherein:  
         [0011]      FIG. 1  is a schematic illustration of a computing device configured for locale and operating platform independent font selection; and,  
         [0012]      FIG. 2  is a flow chart illustrating a process for locale and operating platform independent font selection in the system of  FIG. 1 . 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0013]     The present invention is a method, system and apparatus for locale and operating platform independent font selection. In accordance with the present invention, a definition file can be created which can associate a list of fonts known to support the non-Latin characters of a specific locale under different operating platform configurations. Subsequently, the definition file can be loaded and parsed in a particular operating platform for a selected locale such that each of the listed fonts can be tested to determine whether the listed fonts can support the non-Latin text of the particular operating platform for the selected locale. Whenever a font is located which can satisfy the foregoing test, the font can be registered for use in the operating platform.  
         [0014]     By trifurcating the process of locale and operating platform independent font selection, the invention allows for different specialists to satisfy the different stages of font selection independently of one another. For instance, the font provider can generate the font properties for a font. Subsequently, a developer having knowledge of font support for different locales and operating platforms can complete a font definition file utilizing the font properties, and an application programming interface (API) for parsing the font definition file. Finally, the application developer need only know what static value in memory to query in order to determine what font to call.  
         [0015]     In more particular illustration of the structure and operation of the present invention,  FIG. 1  is a schematic illustration of a computing device  110  configured for locale and operating platform independent font selection. As shown in  FIG. 1 , a locale and operating platform independent font selection system  130  can interoperate with an operating platform  120  disposed in the computing device  110 . The operating platform  120  can have a particular configuration and can be linked to a specified locale. Utilizing a font properties file  140 , the locale and operating platform independent font selection system  130  can select a suitable font for use in the operating platform  120  so as to be able to handle the non-Latin text requirements of the operating platform  120 .  
         [0016]     To enable the seamless selection of a suitable font for use in the operating platform to accommodate a particular configuration and locale, a process for locale and operating platform independent font selection can be implemented within the locale and operating platform independent font selection system  130 . In further illustration,  FIG. 2  is a flow chart illustrating a process for locale and operating platform independent font selection as incorporated in the locale and operating platform independent font selection system  130  of  FIG. 1 .  
         [0017]     Beginning in block  205 , a font can be specified for use in an application in the operating platform. In decision block  210 , it can be determined whether the specified font already has been registered for use in the operating platform for the required locale. If so, in block  255  the registered font can be utilized. Otherwise, in block  215  an entry for the font can be located in the font properties file. In decision block  220 , if the located entry indicates support for the particular operating platform configuration and required locale, in block  260  the font specified in the entry can be registered in the operating platform and the font can be utilized in block  255 . Otherwise, the process can continue through decision block  240 .  
         [0018]     Notably, the entries within the font properties file can include a listing of fonts and corresponding supported operating platform configurations for a particular locale. Notably, the ordering of the entries can indicate a priority of selection for use in a particular operating platform for a specified locale. In one aspect of the invention, a single font properties file can be established for all operating platform configurations. In another aspect of the invention, a font properties file can be established for each operating platform configuration. In both aspects the file can refer to a single locale.  
         [0019]     In decision block  240 , if it is determined that additional entries remain to be analyzed in the font properties file for the specified font, in block  215  a next entry in the font properties file can be located for the specified font to determine whether the entry indicates support for the configuration of the operating platform and for the preferred locale. Again, in decision block  220 , if the located entry indicates support for the particular operating platform configuration and required locale, in block  260  the font specified in the entry can be registered in the operating platform and the font can be utilized in block  255 . Otherwise, the process can continue until a suitable entry is located, or until no more entries remain for the font properties file.  
         [0020]     In block  225 , when all entries have been exhausted for the specified font, in block  225  all fonts in the operating platform can be loaded for analysis. Subsequently, in block  230  the first loaded font can be analyzed to determine in decision block  235  whether the loaded font can support the non-Latin text of the required locale. If so, the font can be registered in block  260  and utilized in block  255 . Otherwise, if more fonts can be loaded in decision block  245 , the process can repeat in block  230 . When no more loaded fonts remain to be analyzed, it can be presumed that no loaded fonts or fonts specified in the font properties file can directly satisfy the particular operating platform configuration and required locale. Accordingly, a fail over process can executed in block  250  which can range from either utilizing a default font, or returning a failure code.  
         [0021]     The present invention can be realized in hardware, software, or a combination of hardware and software. An implementation of the method and system of the present invention can be realized in a centralized fashion in one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system, or other apparatus adapted for carrying out the methods described herein, is suited to perform the functions described herein.  
         [0022]     A typical combination of hardware and software could be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein. The present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which, when loaded in a computer system is able to carry out these methods.  
         [0023]     Computer program or application in the present context means any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following a) conversion to another language, code or notation; b) reproduction in a different material form. Significantly, this invention can be embodied in other specific forms without departing from the spirit or essential attributes thereof, and accordingly, reference should be had to the following claims, rather than to the foregoing specification, as indicating the scope of the invention.