Skip to content

palf-gh/MasterSeriesCopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Master Series Copy

A Glyphs 3 palette plugin for copying layer contents between font masters using flexible template pattern matching.

Features

  • Template-based pattern matching: Define master name patterns using placeholders like {weight} and regular expressions
  • Bidirectional copying: Copy from Pattern A to Pattern B (↓) or from Pattern B to Pattern A (↑)
  • Flexible master selection: Use regular expressions to match specific masters or entire series
  • Layer content copying: Copies shapes, anchors, guides, hints, width, and metrics keys

Installation

  1. Download or clone this repository
  2. Copy the MasterSeriesCopy.glyphsPalette folder to your Glyphs plugins folder:
    • ~/Library/Application Support/Glyphs 3/Plugins/
  3. Restart Glyphs 3
  4. The plugin will appear in the Palette sidebar (Window → Palette)

Usage

Basic Setup

  1. Define Pattern IDs: In the "Pattern ID and Regular Expression" table, define ID and regex pairs

    • Example: weight : ^(.*)$ (matches any master name)
  2. Set Name Patterns:

    • Pattern A: {weight} (source pattern)
    • Pattern B: {weight} Melt (destination pattern)
  3. Select glyphs in Font View

  4. Click arrow buttons:

    • ↓ (Down): Copies from Pattern A → Pattern B
    • ↑ (Up): Copies from Pattern B → Pattern A

Examples

Copy entire series

  • Pattern ID: weight : ^(.*)$
  • Pattern A: {weight}
  • Pattern B: {weight} Melt
  • Result: Copies all masters (Light, Regular, Bold) to their Melt variants

Copy specific weight only

  • Pattern ID: weight : ^Bold$
  • Pattern A: {weight}
  • Pattern B: {weight} Melt
  • Result: Copies only BoldBold Melt

How It Works

  1. The plugin matches master names against Pattern A (or Pattern B for reverse direction)
  2. Captured values from placeholders (e.g., {weight}) are extracted
  3. These values are used to expand the destination pattern
  4. Layer contents are copied between matching master pairs

Requirements

  • Glyphs 3
  • Python 3 (included with Glyphs)

License

MIT License

Author

Palf


マスターシリーズコピー

Glyphs 3 用のパレットプラグイン。テンプレートパターンマッチングを使用して、フォントマスター間でレイヤー内容をコピーします。

機能

  • テンプレートベースのパターンマッチング: {weight} のようなプレースホルダーと正規表現を使用してマスター名パターンを定義
  • 双方向コピー: パターン A からパターン B へ(↓)、またはパターン B からパターン A へ(↑)コピー
  • 柔軟なマスター選択: 正規表現を使用して特定のマスターまたはシリーズ全体をマッチ
  • レイヤー内容のコピー: シェイプ、アンカー、ガイド、ヒント、幅、メトリクスキーをコピー

インストール

  1. このリポジトリをダウンロードまたはクローン
  2. MasterSeriesCopy.glyphsPalette フォルダを Glyphs プラグインフォルダにコピー:
    • ~/Library/Application Support/Glyphs 3/Plugins/
  3. Glyphs 3 を再起動
  4. プラグインはパレットサイドバー(ウィンドウ → パレット)に表示されます

使用方法

基本設定

  1. パターン ID を定義: 「パターン ID と正規表現」テーブルで、ID と正規表現のペアを定義

    • 例: weight : ^(.*)$(任意のマスター名にマッチ)
  2. 名前パターンを設定:

    • パターン A: {weight}(ソースパターン)
    • パターン B: {weight} Melt(デスティネーションパターン)
  3. フォントビューでグリフを選択

  4. 矢印ボタンをクリック:

    • ↓ (下): パターン A → パターン B にコピー
    • ↑ (上): パターン B → パターン A にコピー

シリーズ全体をコピー

  • パターン ID: weight : ^(.*)$
  • パターン A: {weight}
  • パターン B: {weight} Melt
  • 結果: すべてのマスター(Light、Regular、Bold)を Melt バリアントにコピー

特定のウェイトのみをコピー

  • パターン ID: weight : ^Bold$
  • パターン A: {weight}
  • パターン B: {weight} Melt
  • 結果: BoldBold Melt のみをコピー

動作原理

  1. プラグインはマスター名をパターン A(または逆方向の場合はパターン B)とマッチング
  2. プレースホルダー(例: {weight})からキャプチャされた値が抽出されます
  3. これらの値を使用してデスティネーションパターンを展開
  4. マッチングするマスターペア間でレイヤー内容がコピーされます

要件

  • Glyphs 3
  • Python 3(Glyphs に含まれています)

ライセンス

MIT License

作者

Palf

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages