Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style.json で任意のスタイル付けプロパティが指定できるようにしてほしい #2

Closed
rnanba opened this issue May 22, 2021 · 2 comments

Comments

@rnanba
Copy link
Owner

rnanba commented May 22, 2021

style.json では色や線の設定項目が SVG のスタイルシートのサブセットになっているが、任意のスタイルプロパティを指定できるようにして欲しい。文字の透明度等を設定したい。

@rnanba
Copy link
Owner Author

rnanba commented May 22, 2021

長さの指定で画像解像度の扱いが煩雑なので px 単位のみ受け付けるようにしていますが、全てのプロパティでそれをやるのは大変です。自己責任で使うことを前提に素通しする仕様にするなら可能かも?

@rnanba
Copy link
Owner Author

rnanba commented May 29, 2021

だいたいこんな仕様で実装します。

  • スタイルプロパティは何でも素通し。原則エラーチェックなし。
  • SVG 1.1 で長さ(length)を取りうるプロパティについてはJSONの数値型で指定された値は px 単位の指定とみなす。
    • '128' のような文字列型の値は単位識別子なしの長さの指定とみなす。
  • font-size は数値型以外エラー。
  • font プロパティのフォントサイズ指定はラベルのレイアウトに反映されない(制限)

@rnanba rnanba closed this as completed in 38d3f5f May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant