カスタムフォントをPolymerのアプリケーションまたは要素にインポートするにはどうすればよいですか?Polymerを使用してカスタムフォントをアプリまたは要素にインポートする方法は?
Polymer Slack Channel上@tweightmanパー:
<link rel="import" href="/bower_components/polymer/polymer-element.html">
<link rel="import" href="/bower_components/my-typography/my-typography.html">
<dom-module id="my-page-styles">
<template>
<style include="my-typography">
:host {
@apply --my-custom-font-mixin;
}
</style>
</template>
</dom-module>
は可能な解決策に出くわし:代わりに私の-typography.htmlスタイルモジュール内
@font-face
ルールを使用しての、私の代わりに<link rel="stylesheet" href="my-font-face.css">
に持っているようです。私のアプリのシェルエントリポイント(index.html
)で
私は、ポリマーアプリに新しいフォントを追加し、デフォルトのフォントとして使用する権利の実装を見つけようとしています。あなたの可能な解決策をもう少し詳しく説明できますか? my-typography.htmlには何が入っていますか? –
@ d.mares:私はまだ解決策がありません。 [ただし、ここには参照ファイルの親戚の公開バージョンがあります](https://github.com/PolymerElements/paper-styles/blob/master/typography.html)。もしあなたがそれを考え出すなら、答えを加えてください。それが少なくともうまくいかなくても、それはいくつかのアイデアを生み出すのを助けるかもしれません。 https://github.com/PolymerElements/paper-styles/blob/master/typography.html – Mowzer