has google font a chance to work ?

If you have searched the other User Creations subforums and an answer to your question has not been found, please post here!

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
bobifle
Giant
Posts: 219
Joined: Thu Oct 19, 2017 12:36 pm

has google font a chance to work ?

Post by bobifle »

For now everything is working in the below code except the font selection.

I put

Code: Select all

<link href='https://fonts.googleapis.com/css?family=EB+Garamond|Tangerine' rel='stylesheet'> 
 h1 { font-family: 'Tangerine','EB Garamond', serif;}
but nothing's changing

Code: Select all

[frame("Token_Sheet"): {
<html>
 <head>
 <link href='https://fonts.googleapis.com/css?family=EB+Garamond|Tangerine' rel='stylesheet'> 
 [r: "
 <style>
 .sblock { background: #FFFFFF; }
 table.sblock {
   width: 100%;
   border: 0px;
   border-collapse: collapse;
 }
 th {background: #0033ff; color: #FFFFFF}
 th, td {
  width: 50px;
  text-align: center;
 }
 h1 { font-family: 'Tangerine','EB Garamond', serif;
      color: #000000;
      font-weight: 700;
      margin: 0px;
      font-size: 24px;
      letter-spacing: 1px;
      font-variant: small-caps;
    }
 h2 {
  font-weight: normal;
  font-style: italic;
  font-size: 12px;
  margin: 0;
 }

 .propline {
  line-height: 1.4;
  display: block;
  text-indent: -1em;
  padding-left: 1em;
  }

 h4 {
  color: #000000;
  margin: 0;
  display: inline;
  font-weight: bold;
 }
 p {
  text-indent: 1em;
  margin: 0;
 }
	.rule { height: 2px; background: #0099ff; position: relative; }
   </style>"]
  <title>Chi Details</title>
 </head>
 <body>
 <div class="sblock">
    <creature-heading>
      <h1>{ getName() }</h1>
    </creature-heading>
	<div class="rule"></div>
    <div class="property-line">
     <h4>Durability</h4>
     <p>{getProperty("durability")}</p>
    </div>
	<div class="rule"></div>
    <table class="sblock">
    <tr> <th>COG</th><th>INT</th><th>REF</th><th>SAV</th><th>SOM</th><th>WIL</th> </tr>
    <tr> <td id="cognition">{getProperty("cognition")}</td><td id="intuition">{getProperty("intuition")}</td><td id="reflex">{getProperty("reflex")}</td><td id="savvy">{getProperty("savvy")}</td><td id="somatics">{getProperty("somatics")}</td><td id="willpower">{getProperty("willpower")}</td></tr>
    </table>
	<div class="rule"></div>
	A native Martian, you were assigned male at birth in pre-Fall Noctis to a family of industrialists part of the Martian hyperelite.&lt;p&gt;You&#39;re socially perceptive, with a gift for ingratiating yourself to potential contacts. Everyone needs a psychologist even if they don&#39;t know it.&lt;/p&gt;
	<div class="rule"></div>
 </div>
 </body>
</html>
}]

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: has google font a chance to work ?

Post by Phergus »

I don't believe you can access external resources with an HREF in a macro.

bobifle
Giant
Posts: 219
Joined: Thu Oct 19, 2017 12:36 pm

Re: has google font a chance to work ?

Post by bobifle »

Well, it works with external img at least. I was hopping the macro would just feed the html to the html frame... :?

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: has google font a chance to work ?

Post by JamzTheMan »

I'm pretty sure the pathfinder framework fetches feats/abilities text via href agains d20pfsrd.com?

But MT is running on a very old HTML/CSS specification, not sure if that is the issue or not...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: has google font a chance to work ?

Post by Phergus »

Got me then.

Assuming the HTML works when viewed with a browser, I guess it's just some issue with the built-in HTML engine.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: has google font a chance to work ?

Post by aliasmask »

I bet it's related to having { } in the style sheet and how it's parsed. I know I toyed with google fonts before and I wasn't able to get it to work. Also, how is the /* line comment */ processed. I don't think MT likes it. Also, if it were just a style sheet, then it may work but it runs a process on your computer to include the font if you don't have it, which is the point of using google fonts, but to MT that is a security issue. You're better off just using your own style sheet and having your players install the fonts you want.

Post Reply

Return to “Requests for HELLLLP!”