Different font depending on file extension

Different font depending on file extension

5
NewbieNewbie
5

    Jan 18, 2005#1

    I don't really want syntax highlighting or auto-correction, I just want to use a different font if a file with a certain extension is loaded. Is that possible? I want UE to use the Terminal font for .NFO and .DIZ files and the standard Arial for everything else. Can this be done through UE's syntax highlighting feature or another method? Thanks...

    6,603548
    Grand MasterGrand Master
    6,603548

      Jan 18, 2005#2

      Not possible with syntax highlighting.

      You can only activate in the Advanced - Configuration - General the first item Allow multiple instances, save this setting, create a copy of uedit32.ini, for example ueinfo.ini in UltraEdit directory and load this alternative ini-file with the command line option for .NFO and .DIZ files. Set the Terminal font as text font when UltraEdit is first time loaded with ueinfo.ini.

      To register .NFO and .DIZ with UltraEdit with the alternative ini-file, copy following lines to a text file, save the file with the extension .reg and double click on this reg-file to import it to the registry. But first check the paths at the last line.

      REGEDIT4

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nfo]
      @="UltraEdit-32 INFO"

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.diz]
      @="UltraEdit-32 INFO"

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 INFO]

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 INFO\shell]

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 INFO\shell\open]

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 INFO\shell\open\command]
      @="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" \"%1\" /I=\"C:\\Program Files\\UltraEdit\\Ueinfo.ini\""


      After this procedure you can double click on .NFO and .DIZ file and it will be opened with UltraEdit with Terminal font.

      Inserted on 2006-09-07:
      Forget that complicated solution above. A better solution exists since version 10.00 (??? don't really know the version).

      At Configuration - Editor - Word Wrap/Tab Settings for v11+ or at Configuration - Edit click on button Change List, enter diz nfo and press the button Add to add it to the list.

      Close the Modify File Types dialog with OK and press the button Apply.

      Next select diz nfo in the drop down list. Then click on button Font to specify the font which should be used for files with the extension diz or nfo. Save the settings for diz nfo now by pressing the button OK.

      Extra hint: diz and nfo files are normally OEM character set files. So when a diz or nfo file is open click on View - OEM Character Set. Until you uncheck it again now all files with the extension diz or nfo are edited with OEM character set and all other files with ANSI character set. See also OEM Character Set command is gone?
      Best regards from an UC/UE/UES for Windows user from Austria

      5
      NewbieNewbie
      5

        Jan 27, 2005#3

        Thanks, that's a good idea except I hate the option to have multiple instances. Oh well, maybe Ian will add font to the syntax highlighting in the future. Seems like it should be something simple to do/add.

        1
        NewbieNewbie
        1

          Jul 18, 2007#4

          All,

          I have to process a few files that contain Japanese/Chinese characters. For this I set "Arial Unicode MS" as my font. Now, I have to process some files that need a standard width font like "Courier"

          Unfortunately, it looks like the font is set for the whole application. Is there any way to automatically change the font or script a change? I tried a macro for a font change but it's not working.

          Thanks,
          Bill

          6,603548
          Grand MasterGrand Master
          6,603548

            Jul 19, 2007#5

            You can specify fonts on a file extension base by doing following steps at Configuration - Editor - Word Wrap/Tab Settings:
            1. Click on button Change List....
            2. Enter the file extension(s) without point (is not part of the file extension) in the edit field. Multiple extensions must be separated with a space, for example bat nfo is for batch and info files (case is not important).
            3. Press button Add and closed the dialog with button OK.
            4. Select in the drop down list the entry with the extensions you have just entered.
            5. Click on button Font and select the font for files with those extensions.
            6. If you want you can modify also all other settings in this dialog for those extensions.
            7. Saved the new settings by closing the configuration dialog with button OK.
            Now you have a different font for those files.

            Note: OEM Character Set, also known as Extended ASCII Codes (IBM), in menu View is also saved individually according to the file extensions in the drop down list of this configuration dialog. But the font for hex and column mode is the same for all files. See also Manual customization of OEM Character Set command