Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Can "Add Font Plugin" and "D3D plugin by Cloggy" work together?

Author
Message
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 3rd Jan 2009 20:18
So can anybody help me? is it possible to make "Add Font Plugin" and "D3D plugin by Cloggy" work together? i just want to load diferent fonts from my project folder and use them in D3D plugin!!!HELP!!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Jan 2009 20:47
What have you tried?

I'd be surprised if they didn't work together, seeing as Cloggy wrote both of them.

Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 3rd Jan 2009 20:50
so "Add Font Plugin" load font from your project folder,and dbpro can use it after that..but "D3D plugin" cant use it!!!((( "D3D plugin" can use only fonts which was installed by windows!!
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 4th Jan 2009 23:54
Kuper,

Can you provide me a short code example that I can compile and try debugging here?

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 6th Jan 2009 15:46 Edited at: 6th Jan 2009 15:47
IIRC some time ago I tried to do the same thing and it didn't work for me either so I had to go the 'bitmap font route'.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB Ram, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DirectX10, DBPro 7.1
Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 28th Jan 2009 12:38 Edited at: 28th Jan 2009 12:39
It works for me. Though I'd really like to set the "character set value" that the DBP set font command takes. Would that be realistic to add to your plugin, Cloggy? It's quite difficult to support different languages without that option. Or my own.

This message was brought to you by Grandma industries.

Making yesterdays games, today!
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 28th Jan 2009 12:54
Grandma,

If you check the Main D3DFunc thread. There is a version on there that does just that, you'll need to look through the last couple of pages. Problem is it only works on DBP 7.0+. It isn't on my web site at the moment as I have bee a bit busy lately.

Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 28th Jan 2009 18:00 Edited at: 28th Jan 2009 19:40
Oh really? Cool.

Yup, found it. And it works like a charm, though charms never work, but this certainly does.

However, there is one thing. Nothing serious, I'm using the plugin to generate buttons, pasting the text on template sprites and use the get image command. It worked nicely without the plugin (however the text looked crappy because of the lack of anti-aliasing amongs other things), but with the plugin, I need to set the font size to 200+ before I reach the same size as DBP's 24-size, roughly. The text was just a pixel high with 24 as size. Same goes with positioning the text, it's like everything works at a much larger scale.

When pasting text to the screen normally, it works as it should. I'll continue experimenting.

Edit: The text get squashed by the same ratio as the bitmap I'm getting the image from. The font size is relative.

This message was brought to you by Grandma industries.

Making yesterdays games, today!
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 28th Jan 2009 22:12
Grandma,

Not using Vista by any chance?

I've seen people report that on vista before. Unfortunately I haven't got vista to test on.

Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 28th Jan 2009 22:45
I'm using XP actually, with DBP 7.1.

I experimented a bit further, the bug is not present in full screen exlusive mode. My project use Windowed - full screen.

This message was brought to you by Grandma industries.

Making yesterdays games, today!
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 29th Jan 2009 00:00
I'd Probably have to see the project to find out what's happening. If you happy to email it to me or can reproduce in some sample code I'll take a look.

Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 29th Jan 2009 00:52
I've reproduced it to a degree. In this example, the screen mode seems irrelevant for some reason.



This message was brought to you by Grandma industries.

Making yesterdays games, today!
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 29th Jan 2009 12:33
That would be because the StartText command sets the viewport to screenwidth, screenheight. I would assume that it is treating your bitmap as if it is much bigger therefore the text is scaled accordingly.

Any reason you can't do things the way you have in the above example?

Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 29th Jan 2009 13:42
Quote: "Any reason you can't do things the way you have in the above example?"

I'm working on a big project, 50k+ lines thus far. I just want it to be "clean" that's all. And also, I might need to query the bitmap size once in a while for dynamic function purposes. But if you're asking me if I can live with it, then yes. I guess I could.

This message was brought to you by Grandma industries.

Making yesterdays games, today!

Login to post a reply

Server time is: 2024-03-29 13:31:46
Your offset time is: 2024-03-29 13:31:46