Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old February 10, 2009, 17:03   #1
Malak Darkhunter
Knight
 
Join Date: May 2007
Location: US
Age: 45
Posts: 730
Malak Darkhunter is on a distinguished road
Sangband wall fix for windows vista

Okay playing latest unofficial beta version of Sang, problem is vista won't display walls in the extended fonts, or pure ascii. So I downloaded the wall fix from Nick's Oangband page and replaced the font file, I now have acii walls like they should be. The difference though is that using the extended fonts, the walls are bright white and the special graphics are displayed as acii characters, a boulder uses the # mark and so on. I am using pure acii because of this and looks really nice, except that breath, ball spell colors aren't displaying correctly. They are all showing as black, at least I can see it, except I wish the color was there, Is it possible to get a fix for vista users?
Malak Darkhunter is offline   Reply With Quote
Old February 10, 2009, 19:07   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Malak Darkhunter View Post
Okay playing latest unofficial beta version of Sang, problem is vista won't display walls in the extended fonts, or pure ascii. So I downloaded the wall fix from Nick's Oangband page and replaced the font file, I now have acii walls like they should be. The difference though is that using the extended fonts, the walls are bright white and the special graphics are displayed as acii characters, a boulder uses the # mark and so on. I am using pure acii because of this and looks really nice, except that breath, ball spell colors aren't displaying correctly. They are all showing as black, at least I can see it, except I wish the color was there, Is it possible to get a fix for vista users?
It's unlikely, unless Camlost happens to use Vista or otherwise be interested in fixing it. Sangband's official maintainer has not been heard from in over a year.

CC
Magnate is offline   Reply With Quote
Old March 28, 2009, 15:45   #3
Fuma
Adept
 
Fuma's Avatar
 
Join Date: May 2007
Posts: 114
Fuma is on a distinguished road
I have no experience whatsoever with fonts and how they work, but it seems that depending on the system, the fonts included in the lib/xtra/fonts folder can behave in a different way.

Maybe it has something to do with the way Windows handles Unicode or whatnot, but on standard Windows XP, the character list looks like this:

Then, after going to the regional settings and installing Asian language support, it changes into this:


Now that I'm on Vista. It looks almost the same as Windows XP with Asian language support. The only difference is that the character number 127 is also missing.

I even opened the fonts in a font-viewer. Vista simply doesn't see the changed characters. I believe there is some Microsoft magic going on in the background, but this seems as if Vista couldn't recognise the characters and substituted them with some default values.

Could anyone try to recreate the fonts with, I don't know, some different character codes or what not. I'm guessing each character has a "character code" which allows programs to guesstimate what character should be used when the explicit number was not provided. That code is somehow overlapping with established Unicode values and this confuses Windows.
__________________
www.snowleopard.org - International Snow Leopard Trust

Last edited by Fuma; March 29, 2009 at 09:19.
Fuma is offline   Reply With Quote
Old March 28, 2009, 20:39   #4
RogerN
Swordsman
 
RogerN's Avatar
 
Join Date: Jul 2008
Posts: 308
RogerN is on a distinguished road
Quote:
Originally Posted by Fuma View Post
Then, after going to the regional settings and installing Asian language support, it changes into this:
I've been wondering for months what it was that messed up my Sangband font. Sure enough, uninstalling Asian language support fixed it. Thanks!
RogerN is offline   Reply With Quote
Old March 28, 2009, 20:43   #5
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,951
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by RogerN View Post
I've been wondering for months what it was that messed up my Sangband font. Sure enough, uninstalling Asian language support fixed it. Thanks!
I think that all of the font handling woes of recent years show that Angband really shouldn't be using Windows' own font-handling functions for what it does...
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old March 28, 2009, 20:53   #6
Fuma
Adept
 
Fuma's Avatar
 
Join Date: May 2007
Posts: 114
Fuma is on a distinguished road
Quote:
Originally Posted by RogerN View Post
Thanks!
I'm glad I was of use

Quote:
I think that all of the font handling woes of recent years show that Angband really shouldn't be using Windows' own font-handling functions for what it does...
We could settle for graphic tiles representing letters. The various font sizes could be a problem, but I guess with enough tile variants, it shouldn't be that hard I hope.
__________________
www.snowleopard.org - International Snow Leopard Trust
Fuma is offline   Reply With Quote
Old March 28, 2009, 21:42   #7
RogerN
Swordsman
 
RogerN's Avatar
 
Join Date: Jul 2008
Posts: 308
RogerN is on a distinguished road
Quote:
Originally Posted by Fuma View Post
IWe could settle for graphic tiles representing letters. The various font sizes could be a problem, but I guess with enough tile variants, it shouldn't be that hard I hope.
The current Angband fonts are really just graphics tiles when you come right down to it. The TextOut function (which is used by almost all Angband variants) in the Win32 API is just a very efficient way of drawing the tiles in arbitrary colors. Font sizes are already a problem - hence why Angband is distributed with multiple font files. Bitmap fonts do not scale well, so you need one for each size.

It's certainly possible to emulate the behavior of the TextOut function using standard GDI calls that don't mess with fonts, just standard bitmap blitting. I don't know off the top of my head what the performance penalty would be.

Think I'll give it a try real quick... I'll post the results when I'm done.
RogerN is offline   Reply With Quote
Old March 28, 2009, 21:49   #8
Fuma
Adept
 
Fuma's Avatar
 
Join Date: May 2007
Posts: 114
Fuma is on a distinguished road
Quote:
Originally Posted by RogerN View Post
I don't know off the top of my head what the performance penalty would be.
Since the problems occur mainly with newer microsoft systems, I doubt the performance hit will be noticeable on a modern PC.
Ghetto 10MHz systems carved in rock with transistors welded by hand by the owner may have some performance issues.

Quote:
Think I'll give it a try real quick... I'll post the results when I'm done.
Thank you so much.
__________________
www.snowleopard.org - International Snow Leopard Trust
Fuma is offline   Reply With Quote
Old March 29, 2009, 00:17   #9
RogerN
Swordsman
 
RogerN's Avatar
 
Join Date: Jul 2008
Posts: 308
RogerN is on a distinguished road
Just finished the test. I used a continuously-refreshing window to measure performance. The simulated console size was 80 x 50 characters, and the font size was 8 x 13. For each frame I filled the entire console with random characters and foreground colors.

Current Angband method - TextOut
The current method of drawing the console (for Windows) is to use the TextOut function. On my system this method gets about 260 fps.

Plain old bitmaps method
This method uses FillRect to fill the target area with the foreground color and then calls BitBlt to output the character(s) with the SRCAND raster operation, effectively drawing your tile/character in whatever foreground color you want. On my system this method gets about 104 fps.

So basically using plain bitmaps instead of TextOut is a little more than twice as slow. But, you don't have to put up with any Vista / XP font quirks, and it's fast enough for Angband. Really old systems will probably be using a much smaller console size anyway (80x25), and that would double the performance.

It should also be possible to extract appropriate bitmaps directly from the .FON files which are already distributed with Angband. I didn't do this for my test, though... I just used a custom bitmap with 8x13 tiles.
RogerN is offline   Reply With Quote
Old March 29, 2009, 05:36   #10
darke
Rookie
 
Join Date: Mar 2009
Posts: 8
darke is on a distinguished road
Quote:
Originally Posted by RogerN View Post
It should also be possible to extract appropriate bitmaps directly from the .FON files which are already distributed with Angband. I didn't do this for my test, though... I just used a custom bitmap with 8x13 tiles.
The .FON files are just your standard win3.11 FNT files packaged into a dll. They're easy enough to unpack, but I'd recommend just parsing the .bdf files (they're pure text rather then binary) and outputting that as a bitmap (or just using it as is at runtime), since it's going to be much simpler then writing a .FNT converter.

An other alternative is to grab one of the dozen "font to bitmaps" programs floating around the 'net and use that to write a bmp/png in the same format as the tiles.

Integrating freetype so you can use any random ttf symbol font installed on the machine (Wingdings! Sauron as a frowny face!), is of course an exercise for the reader.
darke is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Emergency fix for stat potion scarcity? Donald Jonker Vanilla 15 January 16, 2009 04:38
Help With Walls In Vista z118 Vanilla 2 December 8, 2008 15:44
wall building? Slick Vanilla 8 November 1, 2007 01:29
Vanilla freezes in Vista after a few seconds pamperedpeterson Vanilla 4 September 19, 2007 01:25
Any way to fix the Esc problem for Linux? TJA Vanilla 6 August 17, 2007 14:42


All times are GMT +1. The time now is 02:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.