Fonts refactoring and Add Font dialog (#660)

* fonts rework - start

* fonts rework - continue

* fonts rework - fetch google font

* fonts rework - issue fixes

* fonts rework - add fonts to downloaded image

* fonts rework - add methods dialog

* fonts rework - add methods description

* fonts update - move version to 1.661

* fonts - remove unused file
This commit is contained in:
Azgaar 2021-09-09 00:12:45 +03:00 committed by GitHub
parent 50dc5e3465
commit fe330ede3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 394 additions and 415 deletions

View file

@ -2,7 +2,7 @@
// https://github.com/Azgaar/Fantasy-Map-Generator
"use strict";
const version = "1.66"; // generator version1
const version = "1.661"; // generator version
document.title += " v" + version;
// Switches to disable/enable logging features
@ -122,7 +122,6 @@ let customization = 0; // 0 - no; 1 = heightmap draw; 2 - states draw; 3 - add s
let biomesData = applyDefaultBiomesSystem();
let nameBases = Names.getNameBases(); // cultures-related data
const fonts = ["Almendra+SC", "Georgia", "Arial", "Times+New+Roman", "Comic+Sans+MS", "Lucida+Sans+Unicode", "Courier+New", "Verdana", "Arial", "Impact"]; // default fonts
let color = d3.scaleSequential(d3.interpolateSpectral); // default color scheme
const lineGen = d3.line().curve(d3.curveBasis); // d3 line generator with default curve interpolation
@ -220,7 +219,7 @@ void (function checkLoadParameters() {
})();
function generateMapOnLoad() {
applyStyleOnLoad(); // apply default of previously selected style
applyStyleOnLoad(); // apply default or previously selected style
generate(); // generate map
focusOn(); // based on searchParams focus on point, cell or burg from MFCG
applyPreset(); // apply saved layers preset
@ -378,6 +377,7 @@ function showWelcomeMessage() {
alertMessage.innerHTML = `The Fantasy Map Generator is updated up to version <b>${version}</b>.
This version is compatible with ${changelog}, loaded <i>.map</i> files will be auto-updated.
<ul>Main changes:
<li>Add custom fonts dialog</li>
<li>Save and load <i>.map</i> files to Dropbox</li>
<li>Ability to add control points on river edit</li>
<li>New heightmap template: Taklamakan</li>