Google Web Fonts in MapTool?
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.
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.
Google Web Fonts in MapTool?
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.
For what it's worth, Bangers would be great for a pulp game.
Kristian
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: Google Web Fonts in MapTool?
I assume this macro should be correct if it would be possible
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
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>
}]
Re: Google Web Fonts in MapTool?
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.
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.
Re: Google Web Fonts in MapTool?
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.)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
Re: Google Web Fonts in MapTool?
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.
Time-Zone information UTC -5
Re: Google Web Fonts in MapTool?
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.
Re: Google Web Fonts in MapTool?
Which is the reason why I was curious about Google Web Fonts.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.
Kristian
Re: Google Web Fonts in MapTool?
Oh, well.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.
Kristian
Re: Google Web Fonts in MapTool?
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
Re: Google Web Fonts in MapTool?
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
http://googlecode.blogspot.com/2011/11/ ... vices.html
Kristian
Re: Google Web Fonts in MapTool?
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!
We'll have to keep that in mind for when MT starts getting fancy with fontwork. Thanks!