[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Font

Font

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Sun 28 Nov 2004 12:25 AM (UTC)
Message
In 3.54 my Terminal 8 pt is "stretched" horizontally and not the same as was before or what is displayed in the font preview box. Why is that?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 28 Nov 2004 01:12 AM (UTC)

Amended on Sun 28 Nov 2004 01:13 AM (UTC) by Nick Gammon

Message
I changed the font initialisation from DEFAULT_CHARSET to ANSI_CHARSET which I hoped would not have any bad effects, and was to help solve a problem as reported in this post:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2297

I found this quote on the documentation for the operating system call I use to create fonts (CreateFont):

Quote:

The font mapper does not use the DEFAULT_CHARSET value. An application can use this value to allow the name and size of a font to fully describe the logical font. If a font with the specified name does not exist, a font from any character set can be substituted for the specified font. To avoid unexpected results, applications should use the DEFAULT_CHARSET value sparingly.


Since I had DEFAULT_CHARSET all through the program, and it said to use it sparingly, I substituted ANSI_CHARSET.

However this shouldn't cause stretching, can you post a screenshot somewhere? It looks OK for me.

Hmmm, reading a bit further I see this:


fdwCharSet 

Specifies the character set. The following values are predefined: 

ANSI_CHARSET
BALTIC_CHARSET
CHINESEBIG5_CHARSET
DEFAULT_CHARSET
EASTEUROPE_CHARSET
GB2312_CHARSET
GREEK_CHARSET
HANGUL_CHARSET
MAC_CHARSET
OEM_CHARSET
RUSSIAN_CHARSET
SHIFTJIS_CHARSET
SYMBOL_CHARSET
TURKISH_CHARSET 

Korean Windows: 
JOHAB_CHARSET 

Middle-Eastern Windows: 
HEBREW_CHARSET
ARABIC_CHARSET 

Thai Windows: 
THAI_CHARSET 


The OEM_CHARSET value specifies a character set that is operating-system dependent.


And it goes on to say:

Quote:

Fonts with other character sets may exist in the operating system. If an application uses a font with an unknown character set, it should not attempt to translate or interpret strings that are rendered with that font.

This parameter is important in the font mapping process. To ensure consistent results, specify a specific character set. If you specify a typeface name in the lpszFace parameter, make sure that the fdwCharSet value matches the character set of the typeface specified in lpszFace.


Well, we are specifying a name, but I'm not sure how I am supposed to satisfy the condition mentioned in the last sentence above.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 28 Nov 2004 02:48 AM (UTC)
Message
I see what the problem is now. When you select a font from the font picker, MUSHclient should store the charset (character set) as well as the name, point size etc. It presently does not, and the previous behaviour of using the default worked fairly well where there was only one font to choose from.

I have update version 3.55 to actually keep in memory (and save to the world file on disk) two new parameters "input_font_charset" and "output_font_charset" which will record the correct number.

So, for example, if you were using the Greek character set, then MUSHclient would remember that.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Sun 28 Nov 2004 02:52 AM (UTC)
Message
By the way, to test this I wrote a small Lua script:


function fonttest ()
local s = ""

  for i = 32, 255 do
    s = s .. string.char (i)
  end
 
Note (s)
end


This displayed all possible characters from space upwards. In the course of testing this I found that MUSHclient was not wrapping correctly if it had no spaces before column 80 (or whatever your limit was). The test allowed the 81st character into the line array, which was one too many.

This is also fixed in version 3.55.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #4 on Sun 28 Nov 2004 03:21 AM (UTC)
Message
Will it be released soon? I want to know because if it's not, I should downgrade to 3.53. This is really ugly :/

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sun 28 Nov 2004 04:17 AM (UTC)
Message
Er, yes I have uploaded it now. There were quite a few changes because a heap of places created fonts, and I hope I caught all of them.

Let me know if:

a) it fixes the problem; and

b) there are any other problems.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #6 on Sun 28 Nov 2004 11:17 AM (UTC)
Message
Will do!

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,844 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]