MyGit
🚩收到GitHub仓库的更新通知

matanki-saito/EU4fontcreate

Fork: 0 Star: 3 (更新于 2024-04-21 21:26:20)

license: 暂无

Language: PowerShell .

Generate fonts for EU4dll

最后发布版本: 6 ( 2020-06-21 03:14:45)

GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

EU4 fontcreate

Overview

  • Steam配信されているWindows版Europa Universalis IVの日本語化パッチの副産物です。パッチはこのプログラムを使って作成されたフォントのみを受け付けます。
  • CP1252の0x80から0x9Fまでに相当する文字(例えば€)はUCS2のコードポイントではなくて、CP1252のコードポイントとして作成されます。
  • 0x100から0x1FFまでの文字は私用領域(0xE000)にシフトされたコードポイントになります。例えばλは3BBではなくて、0xE3BBのコードポイントになります。
  • 0xE,0xFのコードポイントにはそれぞれ、日付用に"日"と"年"が割り振られます。

create on local

Requirement

  • Windows10 or later
  • python 3.5 or later
  • pillow pip install pillow

Usage

  1. 同梱している1_tool/bmfont64.exeを使用して、作成したいフォントのconfigurationファイル(.bmfc)を2_main_text/bmfcフォルダに保存してください。この時、含める文字は空にしてください。
  2. 含めたい文字を2_main_text/sourceフォルダに任意の名前のBOM付きのUTF-8のtxtファイルに入れておきます。こちらで予めCP1252の追加文字と大体のSHIFT_JISの範囲の文字を入れたテキストを用意していますので、これ以外で必要な文字をtxtとして追加してください。
  3. 準備が整ったら、2_main_text/generate.pyを実行します。2_main_text/outフォルダに生成されたフォントが入ります。
  4. 3_map_textについても同様に実施してください。

create on cloud

Automation.

Prepare GitHub repository

  1. GitHubのアカウントを作ってください。
  2. このレポジトリをForkしてください。以下そのForkしてきたレポジトリに対して処理してください。
  3. 1_tool/fontに生成に必要なフォントファイルを入れてください。
  4. 2_main_text/bmfcにbmfontの設定ファイルを入れてください。このとき文字は1つも含めないでください。
  5. 2_main_text/sourceにUTF8-BOMで含めたい文字を入れたテキストを置いてください。拡張子はtxtにしてください。
  6. 3_map_textについても同様にしてください。
  7. 以上の変更をレポジトリのmasterにpushしておいてください。

Prepare Azure Devops

  1. Azure DevOpsの画面を開きます
  2. 無料で始めるをクリックしてください。Microsoftのアカウント作成が必要です。
  3. organizationsを1つ作ってください。名前は何でも良いです。
  4. Projectを1つ作ってください。名前は何でも良いです。
  5. 作成したProjectを開いてPipelinesを開いてください。
  6. Pipelineを1つ作成してください。名前は何でも良いです。
  7. Select a sourceでGitHubを選び、上の方でGitHubにForkしたレポジトリを選んでください。この時、OAuth2の連携が必要になります。
  8. Select a templateはEmptyほげほげリンクを選んでスキップしてください。

Setting up the Pipeline

Pipelineを作ります。この画面は最終的な完成品です。 ymlを載せますので頑張ってそれっぽく作ってください。

resources:
- repo: self
  lfs: true
queue:
  name: Hosted VS2017
#Your build pipeline references the ‘token’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
variables:
  python.version: '3.6'
steps:
- task: UsePythonVersion@0
  displayName: 'Use Python $(python.version)'
  inputs:
    versionSpec: '$(python.version)'


- script: 'python -m pip install pillow'
  displayName: 'install pillow'

- powershell: |
   cd 1_tool
   $targetFolder = './fonts';
   
   $itemList = Get-ChildItem $targetFolder;
   foreach($item in $itemList)
   {
       if($item.PSIsContainer)
       {
           Write-Host ($item.Name + 'is folder'); 
       }
       else
       {
           powershell ./Add-Font.ps1 -ExecutionPolicy unrestricted ./fonts/($item.Name)
       }
   } 
   
   add-type -AssemblyName system.drawing
   (New-Object System.Drawing.Text.InstalledFontCollection).Families
  displayName: 'PowerShell Script'

- script: 'mkdir fonts'
  displayName: 'create temp folder'

- script: |
   cd 3_map_text
   mkdir out
   python generate.py
   cd out
   dir
  displayName: 'generate map font'

- task: CopyFiles@2
  displayName: 'Copy Files to: 3_map_text out'
  inputs:
    SourceFolder: '3_map_text/out'

    Contents: |
     *.dds
     *.fnt
     *.tga

    TargetFolder: fonts


- script: |
   cd 2_main_text
   mkdir out
   python generate.py
   cd out
   dir
  displayName: 'generate main font'

- task: CopyFiles@2
  displayName: 'Copy Files to: 2_main_text out'
  inputs:
    SourceFolder: '2_main_text/out'

    Contents: |
     *.dds
     *.fnt
     *.tga

    TargetFolder: fonts


- task: ArchiveFiles@2
  displayName: 'Archive fonts'
  inputs:
    rootFolderOrFile: fonts

    archiveFile: '$(Build.ArtifactStagingDirectory)/$(filename).zip'


- task: jakobehn.jakobehn-vsts-github-tasks.publish-github-release.PublishGitHubRelease@0
  displayName: 'Publish GitHub Release Build: $(build.buildNumber)'
  inputs:
    applicationName: 'font-test'

    token: '$(token)'

    repo: EU4fontcreate

    owner: 'matanki-saito'

    tagName: 'Build-$(build.buildNumber)'

    releaseName: 'Build: $(build.buildNumber)'

    assetsPattern: '$(Build.ArtifactStagingDirectory)/$(filename).zip'

下記よく確認してください。

  • git LFSを有効にするチェックが入っているか
  • HostはVS2017か

Setting variables and credentials

ファイル名やGitHubに成果物を送信するときのアクセスキーなどを登録します。Taskタブの右にVariablesがあるので、ここで下記のように設定してください。

  • filename: zipのファイル名
  • python.version: pythonのバージョン
  • token: GitHubのアクセストークン(ここで作ってください:https://github.com/settings/tokens)

Que and run

Pipelineをキューに入れて実行を待ちます。処理がうまくいくと、Githubのアセットに生成されたファイルが飛んできます。

Trigger

処理のトリガーはmasterの修正などにすると良いと思います。

Licence

  • generate.py : MIT license
  • bmfont64.exe : zlib license
  • 源ノ明朝 : SIL Open Font License 1.1
  • 源ノ角ゴシック : SIL Open Font License 1.1
  • nvcompress: MIT license
  • Add-Font.ps1 : free
  • runnable-hiero.jar: ?

最近版本更新:(数据更新于 2024-04-18 12:48:22)

2020-06-21 03:14:45 6

2020-06-21 02:52:13 4

2019-12-02 14:22:31 Build-20191202.1

2019-10-12 15:53:50 Build-20191012.1

2019-06-15 19:18:17 Build-20190615.1

2019-03-21 21:08:01 Build-20190321.2

2019-03-21 12:55:01 Build-20190321.1

2019-02-16 03:55:24 Build-20190215.2

matanki-saito/EU4fontcreate同语言 PowerShell最近更新仓库

2024-04-16 16:50:17 actions/runner-images

2024-04-13 01:34:06 dataplat/dbatools

2024-04-12 01:41:23 dotnet/core

2024-03-27 23:45:58 PSAppDeployToolkit/PSAppDeployToolkit

2024-02-09 17:46:21 denoland/deno_install

2023-12-16 00:04:29 k8gege/Ladon