Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
usagimaru committed Jan 27, 2018
1 parent c9659b2 commit 9158b5b
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 268 deletions.
127 changes: 0 additions & 127 deletions IWantAppleSystemFont.sketchplugin/Contents/Sketch/manifest.json

This file was deleted.

103 changes: 0 additions & 103 deletions IWantAppleSystemFont.sketchplugin/Contents/Sketch/script.cocoascript

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

76 changes: 59 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,106 @@
# Sketch Plugin “I Want Apple System Font”

<img src="screenshot_ui.png" width=718>
<img src="screenshot_rectangles.png" width=964>

## What's this ?

Sketchで選択したテキストレイヤーに、Appleの「システムフォント」を適用します。
Sketchで選択したテキストレイヤーにAppleの「システムフォント」を適用します。

「システムフォント」とはSan FranciscoとHiragino Sansによる複合フォントで、和欧混植で違和感がないよう日本語のグリフの大きさやカーニングに微調整が加えられています。フォントとしてSan Franciscoを指定してもそのメトリクスがmacOSやiOSの「システムフォント」とは異なるので、Sketch上で同じ見た目のテキストを再現することができません。Hiragino Sansを指定しても今度は欧文のグリフがSFではなくヒラギノになってしまいます
残念ながらSketchには「システムフォント」を直接指定する方法が備わっていないので、このプラグインでその機能を拡張することにしました
日本語文字を含むシステムフォントはSan FranciscoとHiragino Sansによる複合フォントで、見た目に違和感がないよう日本語の文字の大きさや文字間隔などに微調整が加えられています。日本語に適した禁則処理も行われます。これらの仕組みはフォントに“San Francisco”や“Hiragino Sans”を指定しても再現することができないため、macOSやiOSネイティブの見た目とは異なる描画結果となります
Sketchには元々「システムフォント」を直接指定する方法が備わっていないので、このプラグインを導入することでmacOSやiOSのネイティブのテキストの見た目に近づけることが可能となります

<img src="screenshot_rectangles.png" width=964>
San Francisco/システムフォントの仕組みについてより詳しく知りたい方は次の記事をご覧ください。
> [San Francisco フォントを探る](https://qiita.com/usagimaru/items/da88c0a8793f23633c28)

## Requirements

- macOS 10.12 High Sierra
- Set Gatekeeper option: “App Store and identified developers”
- Sketch Version 48 and later

日本語環境で開発しているので、他の言語環境で正しく動作するか保証できません。10.11 Sierraでもおそらくは動くと思いますが、環境がないので動作を保証できません。

日本語環境で開発しているので、他の言語環境で正しく動作するか保証できません。
あくまでmacOSのシステムフォントを利用しているため、iOSのシステムフォントとは見た目等が異なる可能性があります。

### Set Gatekeeper Option

Allow apps that provided from identified developers on the Security & Privacy settings of System Preferences.

システム環境設定から「セキュリティとプライバシー」を開き、アプリケーションの実行許可を「App Storeと確認済みの開発元からのアプリケーションを許可」に変更してください。

<img src="screenshot_gatekeeper_option.png" width=668>

More details: [https://support.apple.com/HT202491](https://support.apple.com/HT202491)

## Installation

1. Download [the latest version](https://github.com/usagimaru/Sketch-AppleSystemFont-Plugin/releases/latest).
2. Unzip the archive.
3. To install, double-click `sketchplugin` file or direct drag & drop to Sketch's Plugins directory.
4. Launch Sketch.app
5. Then you can see commands `Set Apple System Font` in Plugins menu.
5. Then you can see commands `Apple System Font` in Plugins menu.

--

1. [最新版をここからダウンロード](https://github.com/usagimaru/Sketch-AppleSystemFont-Plugin/releases/latest)してください。
2. それを解凍すると `sketchplugin` ファイルが出来上がります。
3. `sketchplugin` をダブルクリックするか、Sketchの Plugins ディレクトリーに直接放り込んでインストールしてください。
4. Skech.appを再起動します。
5. Pluginsメニューに `Set Apple System Font` メニューが見つかれば成功です。
5. Pluginsメニューに `Apple System Font` メニューが見つかれば成功です。

## Usage

1. Select text layers.
2. Run any commands of `Set Apple System Font` in Plugins menu.
2. Select weight on the inspector panel.

--

1. テキストレイヤーを選択します。
2. Pluginsメニューの `Set Apple System Font` からコマンドを実行します
2. インスペクターから任意のウェイトを選択します

## Keyboard Shortcuts

You can set any key bindings on System Preferences.

システム環境設定のキーボードショートカットで好きなキーの組み合わせを指定することができます。

<img src="screenshot_keyboard.png" width=668>

## Screenshots

<img src="screenshot_ui.png" width=718>
<img src="screenshot_all.png" width=1440>
<img src="screenshot_texteditor.png" width=381>

## Version History

### 0.1.0

18.01.28 JST

- 足りていなかったウェイトを追加:
※ 20pt以上にのみ有効、SF Pro Textにこれらのウェイトが含まれないため。
- Ultra Light
- Thin
- Black
- San FranciscoフォントのFeaturesに対応
- Monospaced Digits
- High Legibility
- Open 4
- Straight 6 and 9
- 0 with Slash (High Legibility)
- Centered Colon
- Capital Forms
- a to ɑ
- インスペクターUIを追加
- Apple System Font
- Typeface (Alternative)
- テキスト編集欄・ポップオーバー
- システムフォントを適用したレイヤーの “Typeface” パネルが使用不可能になってしまっていたが、無理やり使えるようにした
※ 副作用は未確認
- フォント適用時にCharacter SpacingとLine Heightをリセットするようにした


### 0.0.4

17.12.28 JST
Expand Down Expand Up @@ -90,14 +136,10 @@ Sketchで選択したテキストレイヤーに、Appleの「システムフォ
- Bold
- Heavy

## License
## Copyright

Under the [MIT](LICENSE).

## Author
© 2017 Satori Maru.

- Twitter: @usagimaruma
- GitHub: @usagimaru
- Qiita: @usagimaru

© 2017 Satori Maru.
Binary file added screenshot_all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot_gatekeeper_option.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot_texteditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9158b5b

Please sign in to comment.