Coder Social home page Coder Social logo

fontadjust's Introduction

FontAdjust について

Unity5.3系→5.4等に移行すると、UguiのTextが Y方向にずれてしまう問題があります。
alt text

5.3ベースで作成していただいた方々が、5.4以降にスムーズに移行する手助けのため、本ツールを用意させていただきました。

下記のような形で動作いたします
alt text

※1.フォントのデータ次第で、ずれ方が違っておりましたため 全てカバーしきれるかはわかりません。
※2.また複数行ある場合などでの動作も保証は出来ない状態になっております。
※3.プロジェクト内にフォントデータを内蔵している場合のみ動作いたします。

使用方法等

FontAdjust.unitypackage をプロジェクトにインポートすることで必要なものが入ります。

メニューの Tools/FontAdjust/FontAdjustWindowを呼び出すと下記ウィンドウが出てきます。
alt text

・Modeの項目では、上にずらすか下にずらすかを選択できます。5.3->5.4ならば「position up」に指定してください。
・「Execute each prefab」では、Project内にあります全てのprefab中の全てのUI.Textに対して処理をします。
・「Execute All Scene」では、Project内にあります全てのシーンの全てのUI.Textに対して処理をします。
・「Execute Current Scene」では、現在開いているシーンの全てのUI.Textに対して処理をします。

サンプルについて

動作の確認ができるためにサンプルを用意いたしました。
testシーンを開いたうえで、「Tools/FontAdujust/Debug/CreateTest」にて下記ウインドウを呼び出してください
alt text

GameObjectを指定する際には、プロジェクト内にあります以下prefabのいづれかを指定してください。

  • testTemplateBottom
  • testTemplateMiddle
  • testTemplateTop
  • testTemplateChildObject

その後「CreateTest」ボタンを押しますと、プロジェクト内にあるFontデータ分だけテスト用にボタンオブジェクトを生成します。
それが完了したら、「AdjustTo53」ないしは「AdjustFrom53」を押すことでフォント位置が変わることを確認できると思います。

同梱しているフォントについて

こちらでは、m+フォントを利用させていただいております。
https://mplus-fonts.osdn.jp/

また デモをわかりやすくするために、FontForgeというツールを利用して改変したフォントを同梱しております。

fontadjust's People

Contributors

wotakuro avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.