Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Fonts, linking, OpenType, TrueType - what's going on???

Fonts, linking, OpenType, TrueType - what's going on???

Scheduled Pinned Locked Moved The Lounge
questionwindows-adminannouncement
14 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    henchook
    wrote on last edited by
    #1

    I created a font containing a single character glyph with FontLab's FontLab 4.6 (demo version), and installed the font (by simply copying it to the WINNT\Fonts dir). I then fired notepad up, and chose my font, and I saw that my character was being displayed properly, but all the other characters (which my font didn't have any glyphs for) were also being displayed. Notepad was getting them fron another font - but which font? And how? What is the mechanism that controls this? I did not add any font links in the registry - is there some sort of internal font linking in the font? I tried this with both an OpenType and a TrueType font, and got the same results. Can anyone point me towards some documentation where I can study what's happening? Thanks, -CD

    L J 2 Replies Last reply
    0
    • H henchook

      I created a font containing a single character glyph with FontLab's FontLab 4.6 (demo version), and installed the font (by simply copying it to the WINNT\Fonts dir). I then fired notepad up, and chose my font, and I saw that my character was being displayed properly, but all the other characters (which my font didn't have any glyphs for) were also being displayed. Notepad was getting them fron another font - but which font? And how? What is the mechanism that controls this? I did not add any font links in the registry - is there some sort of internal font linking in the font? I tried this with both an OpenType and a TrueType font, and got the same results. Can anyone point me towards some documentation where I can study what's happening? Thanks, -CD

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      hmmmmmm since there isnt a "font" forum i guess its ok to ask this here :) when the current font doesnt have a requested character the reqd character from the closest font is selected by the system (afaik) so u see stuff but it isnt exactly the same if u look closely [edit] errrrr i think :-O [/edit]


      "there is no spoon"
      biz stuff   about me

      1 Reply Last reply
      0
      • H henchook

        I created a font containing a single character glyph with FontLab's FontLab 4.6 (demo version), and installed the font (by simply copying it to the WINNT\Fonts dir). I then fired notepad up, and chose my font, and I saw that my character was being displayed properly, but all the other characters (which my font didn't have any glyphs for) were also being displayed. Notepad was getting them fron another font - but which font? And how? What is the mechanism that controls this? I did not add any font links in the registry - is there some sort of internal font linking in the font? I tried this with both an OpenType and a TrueType font, and got the same results. Can anyone point me towards some documentation where I can study what's happening? Thanks, -CD

        J Offline
        J Offline
        Joey Bloggs
        wrote on last edited by
        #3

        Maybe some kind of font mapper magic, i'm just guessing. Its been a long time since i looked at this area of windows. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnprogwin/html/ch17-02.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_5xir.asp

        H 1 Reply Last reply
        0
        • J Joey Bloggs

          Maybe some kind of font mapper magic, i'm just guessing. Its been a long time since i looked at this area of windows. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnprogwin/html/ch17-02.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_5xir.asp

          H Offline
          H Offline
          henchook
          wrote on last edited by
          #4

          Thanks Lauren, Joey. Obviously, something like what you described is going on behind the scenes. I thought font linking was limited to the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink key, but it seems like there's much more to it. What I'm actually trying to is choose a font for our application, to which we are now adding Unicode support. Our app used "MS Sans Serif", and we were thinking of using "Microsoft Sans Serif", but we though we might run into a problem when adding languages, so we wanted to use our own custom empty font, and add the appropriate links to that. We thought that adding links was simply a matter of editing the appropriate registry keys, but it's begginning to look like it's more than that. Can anyone explain just what font linking involves? Thanks!

          L J 2 Replies Last reply
          0
          • H henchook

            Thanks Lauren, Joey. Obviously, something like what you described is going on behind the scenes. I thought font linking was limited to the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink key, but it seems like there's much more to it. What I'm actually trying to is choose a font for our application, to which we are now adding Unicode support. Our app used "MS Sans Serif", and we were thinking of using "Microsoft Sans Serif", but we though we might run into a problem when adding languages, so we wanted to use our own custom empty font, and add the appropriate links to that. We thought that adding links was simply a matter of editing the appropriate registry keys, but it's begginning to look like it's more than that. Can anyone explain just what font linking involves? Thanks!

            L Offline
            L Offline
            l a u r e n
            wrote on last edited by
            #5

            hmmmmmm maybe im missing something but if u write a different language version of ur app (say french) and distribute it to french speaking users (i assume) then they will have french windows running which will have all the fonts u need ... all u have to do is make sure u translate the strings and such in ur resource file unless i missed something here?


            "there is no spoon"
            biz stuff   about me

            H 1 Reply Last reply
            0
            • L l a u r e n

              hmmmmmm maybe im missing something but if u write a different language version of ur app (say french) and distribute it to french speaking users (i assume) then they will have french windows running which will have all the fonts u need ... all u have to do is make sure u translate the strings and such in ur resource file unless i missed something here?


              "there is no spoon"
              biz stuff   about me

              H Offline
              H Offline
              henchook
              wrote on last edited by
              #6

              That's the way it works if you use the system font, I think. Our application must use Microsoft Sans Serif (this decision came from higher up above me), because it's practically identical to "MS Sans Serif" (what our app used before Unicode conversion). We can't use the system font, because it can change, and if it changes to something like Tahoma (which is wider), it can ruin our UI, causing string cuts, etc. I know bad design isn't an excuse, but I'm not the one calling the shots. So what we have now is that our app uses "Microsoft Sans Serif", which is a Unicode font, but it doesn't support ALL languages. If you want to add extra languages, you need to edit the registry. The problem is we don't want to affect the whole system when adding languages to our app, so we were thinking of using a custom (empty) font, and adding linking to that font in the registry. I tried creating an empty OpenType font (the documentation says that's the only kind that supports font linking) using FontLab software (demo version), but ran into problems. I don't know what additional information is embedded into the font, but the bottom line is that I was unable to control which fonts my font linked to. I added links to specific fonts, and used my font in Notepad, and I was surprised to find that it didn't use the fonts I linked to for displaying characters that my font's didn't have, and instead it used some other font. Any bright ideas? Thanks, again. Chen Drori Mercury Interactive

              J 1 Reply Last reply
              0
              • H henchook

                Thanks Lauren, Joey. Obviously, something like what you described is going on behind the scenes. I thought font linking was limited to the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink key, but it seems like there's much more to it. What I'm actually trying to is choose a font for our application, to which we are now adding Unicode support. Our app used "MS Sans Serif", and we were thinking of using "Microsoft Sans Serif", but we though we might run into a problem when adding languages, so we wanted to use our own custom empty font, and add the appropriate links to that. We thought that adding links was simply a matter of editing the appropriate registry keys, but it's begginning to look like it's more than that. Can anyone explain just what font linking involves? Thanks!

                J Offline
                J Offline
                Joey Bloggs
                wrote on last edited by
                #7

                http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcedsn40/html/cgconenablinglinkedfonts.asp Windows CE provides a font linking capability so that you can link one or more TrueType fonts to another TrueType font. Font linking is typically used to enable Roman fonts to display non-Roman characters. Windows CE provides font linking in the MGTT component. Seems to be CE specific so ignore what we have been saying if you are talking about a CE environment. It seems that they have tried to provide a simplified cutdown way of handling Unicode Fonts that differs significantly from the NT/2K/XP Win32 platform ?

                H 1 Reply Last reply
                0
                • J Joey Bloggs

                  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcedsn40/html/cgconenablinglinkedfonts.asp Windows CE provides a font linking capability so that you can link one or more TrueType fonts to another TrueType font. Font linking is typically used to enable Roman fonts to display non-Roman characters. Windows CE provides font linking in the MGTT component. Seems to be CE specific so ignore what we have been saying if you are talking about a CE environment. It seems that they have tried to provide a simplified cutdown way of handling Unicode Fonts that differs significantly from the NT/2K/XP Win32 platform ?

                  H Offline
                  H Offline
                  henchook
                  wrote on last edited by
                  #8

                  Win2K/XP also provides font linking, controlled through the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink registry key. I can't find anything more about it on MSDN, but it seems like there's more to it. I came to this decision because when I used a font with only one character, the rest of the characters were being displayed despite the absence of font links. Out application is only targeted for Win2k and later, so CE doesn't concern us.

                  J 1 Reply Last reply
                  0
                  • H henchook

                    That's the way it works if you use the system font, I think. Our application must use Microsoft Sans Serif (this decision came from higher up above me), because it's practically identical to "MS Sans Serif" (what our app used before Unicode conversion). We can't use the system font, because it can change, and if it changes to something like Tahoma (which is wider), it can ruin our UI, causing string cuts, etc. I know bad design isn't an excuse, but I'm not the one calling the shots. So what we have now is that our app uses "Microsoft Sans Serif", which is a Unicode font, but it doesn't support ALL languages. If you want to add extra languages, you need to edit the registry. The problem is we don't want to affect the whole system when adding languages to our app, so we were thinking of using a custom (empty) font, and adding linking to that font in the registry. I tried creating an empty OpenType font (the documentation says that's the only kind that supports font linking) using FontLab software (demo version), but ran into problems. I don't know what additional information is embedded into the font, but the bottom line is that I was unable to control which fonts my font linked to. I added links to specific fonts, and used my font in Notepad, and I was surprised to find that it didn't use the fonts I linked to for displaying characters that my font's didn't have, and instead it used some other font. Any bright ideas? Thanks, again. Chen Drori Mercury Interactive

                    J Offline
                    J Offline
                    Joey Bloggs
                    wrote on last edited by
                    #9

                    Insisting on a fixed "Microsoft Sans Serif" font for globalization is simply an INVALID DESIGN DECISION and is going to cause your company much more effort and pain than properly implementing resource localization, as documented by Microsoft as THE SOLUTION to this kind of problem. If you have further issues with data localization as opposed to UI localization then you have yet more work to do. "Microsoft Sans Serif" has glyphs / font subsets to support basic Latin / Roman, Greek, Cyrillic, Hebrew, Arabic and Thai. It does not have glyphs to support any of the asiatic languages for a start.

                    1 Reply Last reply
                    0
                    • H henchook

                      Win2K/XP also provides font linking, controlled through the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink registry key. I can't find anything more about it on MSDN, but it seems like there's more to it. I came to this decision because when I used a font with only one character, the rest of the characters were being displayed despite the absence of font links. Out application is only targeted for Win2k and later, so CE doesn't concern us.

                      J Offline
                      J Offline
                      Joey Bloggs
                      wrote on last edited by
                      #10

                      As you say there is no documentation of this 'feature' for 2K/XP anywhere. I suspect that it is not meant to be used in these environments. 2K/XP have far more sophisticated mechanisms available both to input and display unicode characters in a variety of different languages with different fonts / glyphs.

                      H 1 Reply Last reply
                      0
                      • J Joey Bloggs

                        As you say there is no documentation of this 'feature' for 2K/XP anywhere. I suspect that it is not meant to be used in these environments. 2K/XP have far more sophisticated mechanisms available both to input and display unicode characters in a variety of different languages with different fonts / glyphs.

                        H Offline
                        H Offline
                        henchook
                        wrote on last edited by
                        #11

                        Which brings me back to the question we originally considered before adding Unicode support to our application: Our app uses the MS Sans Serif font, which does not support Unicode. We want to be able to display unicode, and we want to keep using MS Sans Serif, or use an identical font that supports Unicode (like Microsoft Sans Serif). I should mention that we don't want to localize our UI. We simply require to be able to display localized strings in edit boxes, fields, etc... our menus and dialogs will remain in English. I'm sorry, I should have mentioned this before.

                        J 1 Reply Last reply
                        0
                        • H henchook

                          Which brings me back to the question we originally considered before adding Unicode support to our application: Our app uses the MS Sans Serif font, which does not support Unicode. We want to be able to display unicode, and we want to keep using MS Sans Serif, or use an identical font that supports Unicode (like Microsoft Sans Serif). I should mention that we don't want to localize our UI. We simply require to be able to display localized strings in edit boxes, fields, etc... our menus and dialogs will remain in English. I'm sorry, I should have mentioned this before.

                          J Offline
                          J Offline
                          Joey Bloggs
                          wrote on last edited by
                          #12

                          Well then it is just a case of building a unicode release. Ensuring that where ever you are storing the data can handle USC16 or encode / decoding it to UTF8. Then set the Dialog / Menu / Edit font to something appropriate for the language the user is trying to edit / display. "Microsoft Sans Serif" is going to handle the language sets I outlined earlier. You really need to get and read this Developing International Software, Second Edition http://www.microsoft.com/mspress/books/5717.asp

                          H 1 Reply Last reply
                          0
                          • J Joey Bloggs

                            Well then it is just a case of building a unicode release. Ensuring that where ever you are storing the data can handle USC16 or encode / decoding it to UTF8. Then set the Dialog / Menu / Edit font to something appropriate for the language the user is trying to edit / display. "Microsoft Sans Serif" is going to handle the language sets I outlined earlier. You really need to get and read this Developing International Software, Second Edition http://www.microsoft.com/mspress/books/5717.asp

                            H Offline
                            H Offline
                            henchook
                            wrote on last edited by
                            #13

                            So "Microsoft Sans Serif" takes care of most situations, but how do we support CJK and other 'exotic' languages? (BTW, thanks for the book link, I'll definitely get it).

                            J 1 Reply Last reply
                            0
                            • H henchook

                              So "Microsoft Sans Serif" takes care of most situations, but how do we support CJK and other 'exotic' languages? (BTW, thanks for the book link, I'll definitely get it).

                              J Offline
                              J Offline
                              Joey Bloggs
                              wrote on last edited by
                              #14

                              Basically you need to work out what language you are trying to support from input locale etc. Then enum installed fonts looking for ones that have glyphs for that language. Read the book i'm real hazy on the details of all this and it may have changed anyway. Read MSDN April 2003 => Development (General) => Internationalization => SDK Documentation => International Text Display => Unicode and Character Sets GetTextCharsetInfo()

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups