mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 08:45:28 +01:00
Serve font locally
This commit is contained in:
parent
72c6def748
commit
fd0b3b519f
6 changed files with 10 additions and 15 deletions
|
@ -51,7 +51,7 @@ Maputnik is written in ES6 and is using [React](https://github.com/facebook/reac
|
||||||
We ensure building and developing Maputnik works with
|
We ensure building and developing Maputnik works with
|
||||||
|
|
||||||
- Linux, OSX and Windows
|
- Linux, OSX and Windows
|
||||||
- Node 5.11
|
- Node >4
|
||||||
|
|
||||||
Install the deps, start the dev server and open the web browser on `http://localhost:8888/`.
|
Install the deps, start the dev server and open the web browser on `http://localhost:8888/`.
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { loadDefaultStyle, SettingsStore, StyleStore } from './stylestore.js'
|
||||||
import { WorkspaceDrawer } from './workspace.jsx'
|
import { WorkspaceDrawer } from './workspace.jsx'
|
||||||
|
|
||||||
import theme from './theme.js'
|
import theme from './theme.js'
|
||||||
|
import './index.scss'
|
||||||
|
|
||||||
export default class App extends React.Component {
|
export default class App extends React.Component {
|
||||||
static childContextTypes = {
|
static childContextTypes = {
|
||||||
|
|
BIN
src/fonts/Roboto-Regular.ttf
Executable file
BIN
src/fonts/Roboto-Regular.ttf
Executable file
Binary file not shown.
|
@ -1,3 +1,9 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Roboto';
|
||||||
|
src: url('./fonts/Roboto-Regular.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
.app {
|
.app {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">Loading...</div>
|
<div id="app">Loading...</div>
|
||||||
|
|
|
@ -14,19 +14,8 @@ module.exports = [
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
|
test: /\.(eot|svg|ttf|woff|woff2)$/,
|
||||||
exclude: /(node_modules|bower_components)/,
|
loader: 'file?name=fonts/[name].[ext]'
|
||||||
loader: "file"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(woff|woff2)$/,
|
|
||||||
exclude: /(node_modules|bower_components)/,
|
|
||||||
loader: "url?prefix=font/&limit=5000"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
|
|
||||||
exclude: /(node_modules|bower_components)/,
|
|
||||||
loader: "url?limit=10000&mimetype=application/octet-stream"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
||||||
|
|
Loading…
Reference in a new issue