Update game-datcards-improved.user.js
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Game Datacards - Improved
|
||||
// @namespace local
|
||||
// @version 1.2
|
||||
// @version 1.3
|
||||
// @description Adds card image export/import (ZIP) to the header, a button to rotate card backs for printing and a toggle for the official 10th edition card font
|
||||
// @match *://game-datacards.eu/*
|
||||
// @grant none
|
||||
@@ -200,10 +200,12 @@
|
||||
// nothing about how large the app happens to draw that card. So instead of
|
||||
// using pt directly, measure each card and derive how many layout pixels one
|
||||
// point of the printed card is worth; --gdc-pt below carries that value.
|
||||
// Printed datacard width, 7in. Raising it shrinks all card text and lowering
|
||||
// it grows it, so it doubles as the tuning knob for the overall type size:
|
||||
// Printed datacard width, 8in. Measured back from an official card: its body
|
||||
// text sits at ~1.3% of the card width, which puts 7.5pt at this reference.
|
||||
// Raising it shrinks all card text and lowering it grows it, so it doubles as
|
||||
// the tuning knob for the overall type size:
|
||||
// localStorage.setItem('gdc-card-width-pt', 560)
|
||||
const CARD_WIDTH_PT = 504;
|
||||
const CARD_WIDTH_PT = 576;
|
||||
|
||||
function cardWidthPt() {
|
||||
return Number(localStorage.getItem('gdc-card-width-pt')) || CARD_WIDTH_PT;
|
||||
@@ -231,10 +233,11 @@
|
||||
return `
|
||||
.unit, .unit * { font-family: ${CARD_FONT}, sans-serif !important; }
|
||||
|
||||
/* Unit name: extra bold 15pt */
|
||||
/* Unit name: extra bold 15pt, slightly tracked out as on the printed card */
|
||||
.unit .name_container .name {
|
||||
font-weight: 800 !important;
|
||||
font-size: ${pt(15)} !important;
|
||||
letter-spacing: 0.02em !important;
|
||||
}
|
||||
|
||||
/* Unit description: light italic 8pt */
|
||||
@@ -252,26 +255,39 @@
|
||||
font-size: ${pt(14)} !important;
|
||||
}
|
||||
|
||||
/* Section banners ("RANGED WEAPONS", "ABILITIES", "KEYWORDS:") are set a
|
||||
step larger than body text on the printed card, and tracked out. */
|
||||
.unit .heading .title:not(.center),
|
||||
.unit .invul .title,
|
||||
.unit .footer .title {
|
||||
font-weight: 700 !important;
|
||||
font-size: ${pt(9)} !important;
|
||||
letter-spacing: 0.04em !important;
|
||||
}
|
||||
|
||||
/* General weapon and abilities text: regular or bold 7.5pt */
|
||||
.unit .stats_container .caption,
|
||||
.unit .invul .title,
|
||||
.unit .heading .title,
|
||||
.unit .heading .title.center,
|
||||
.unit .ability .name,
|
||||
.unit .ability .title,
|
||||
.unit .footer .title,
|
||||
.unit .ability .value,
|
||||
.unit .footer .value {
|
||||
font-weight: 700 !important;
|
||||
font-size: ${pt(7.5)} !important;
|
||||
}
|
||||
|
||||
.unit .weapon .value,
|
||||
.unit .ability .value,
|
||||
.unit .ability .title,
|
||||
.unit .ability .description,
|
||||
.unit .description-container .description {
|
||||
font-weight: 400 !important;
|
||||
font-size: ${pt(7.5)} !important;
|
||||
}
|
||||
|
||||
/* Keyword lists are small caps, not the plain title case the app uses. */
|
||||
.unit .footer .value {
|
||||
font-variant-caps: small-caps !important;
|
||||
}
|
||||
|
||||
/* Weapon abilities (the keyword/rule chips): bold 5.5pt */
|
||||
.unit .keyword-button,
|
||||
.unit .keyword-button span,
|
||||
|
||||
Reference in New Issue
Block a user