Google Web Fonts in MapTool?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Google Web Fonts in MapTool?

Post by Amaril »

Recently the idea of using Google Web Fonts in MapTool popped into my head, but I wasn't sure if it was possible or not. Has anyone tried it or know how to approach implementing it? (It's been a while since I've messed around with stylesheets in frameworks.)

For what it's worth, Bangers would be great for a pulp game. :)
Kristian

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Google Web Fonts in MapTool?

Post by CoveredInFish »

I assume this macro should be correct if it would be possible

Code: Select all

[frame("font test"): {
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Bangers' rel='stylesheet' type='text/css'>
</head><body>
<p style="font-family: 'Bangers', cursive;">Hallo ... hats geklappt?</p>
</body>
</html>
}]
but at least on a very quick test in an outdated version of MT this doesnt work. So I think its not possible, but I'd be happy to be corrected about that ;)

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Google Web Fonts in MapTool?

Post by Rumble »

Far as I know, MapTool has no means to "leave the sandbox" within a macro, so it couldn't summon information from an external URL.

You can go to an external URL from a link in the chat window (by opening the system's default browser) but other than that, I think it's a no go.

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Re: Google Web Fonts in MapTool?

Post by Amaril »

That's unfortunate. Thanks for looking into this, guys. :)
Kristian

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Google Web Fonts in MapTool?

Post by Azhrei »

CoveredInFish wrote:but at least on a very quick test in an outdated version of MT this doesnt work. So I think its not possible, but I'd be happy to be corrected about that ;)
I'm a bit surprised by this. HTTP URLs typically work (that's why they can be used in <img> tags, for instance). I wouldn't expect the <link> to work in the chat window since the <head> is closed by the time any user text gets to the window. But I figured it would work in a frame... (Which is not to say that the font itself would work, as the Java libraries only support a subset of HTML 3.2 and CSS 2.1, and probably not a large enough subset for Google fonts.)

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Google Web Fonts in MapTool?

Post by neofax »

In Lindsays FW there is a handout macro. I have updated it using his instructions to use all kinds of fonts. The problem is though that both you and the players all need the font installed locally. You can check out his code on how he does this.
Image
Time-Zone information UTC -5

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Google Web Fonts in MapTool?

Post by Azhrei »

I just checked the link used, http://fonts.googleapis.com/css?family=Bangers, and there's no way that will work. I saw the @font-face and knew right away that it wasn't CSS 2.1. :|

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Re: Google Web Fonts in MapTool?

Post by Amaril »

neofax wrote:In Lindsays FW there is a handout macro. I have updated it using his instructions to use all kinds of fonts. The problem is though that both you and the players all need the font installed locally.
Which is the reason why I was curious about Google Web Fonts. ;)
Kristian

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Re: Google Web Fonts in MapTool?

Post by Amaril »

Azhrei wrote:I just checked the link used, http://fonts.googleapis.com/css?family=Bangers, and there's no way that will work. I saw the @font-face and knew right away that it wasn't CSS 2.1. :|
:| Oh, well.
Kristian

User avatar
Vhex
Giant
Posts: 162
Joined: Fri Sep 09, 2011 4:41 am
Location: Honolulu, HI

Re: Google Web Fonts in MapTool?

Post by Vhex »

I wrote a translation tool that may be helpful in this area -- all it really does is pull an image from a table based on the letter used, but it's one way to share fonts with players without having to help them install it on their computer: http://forums.rptools.net/viewtopic.php?f=8&t=20154

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Re: Google Web Fonts in MapTool?

Post by Amaril »

Okay, this is well above my knowledge/skill level, but is this something MapTool could take advantage of?
http://googlecode.blogspot.com/2011/11/ ... vices.html
Kristian

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Google Web Fonts in MapTool?

Post by Azhrei »

That sounds really cool. It seems like an API for building custom fonts within Java and then providing a high-performance interface for using those fonts.

We'll have to keep that in mind for when MT starts getting fancy with fontwork. ;) Thanks!

Post Reply

Return to “MapTool”