Sha256: 2dc34cda328b64cced06d3513991896f76e8dbd4673856ba4512eae3fb3c6b6a

Contents?: true

Size: 1.29 KB

Versions: 9

Compression:

Stored size: 1.29 KB

Contents

module Bioshogi
  module ScreenImage
    class FontThemeInfo
      include ApplicationMemoryRecord
      memory_record [
        # ../assets/fonts
        # NOTE: ricty_sans で位置調整しているため他にするとずれる。他に切り替えるには位置調整をそれぞれのフォントで行わないといけない
        { key: :ricty_sans,           font_regular: "RictyDiminished-Regular.ttf", font_bold: "RictyDiminished-Bold.ttf", },
        { key: :noto_seif,            font_regular: "NotoSerifJP-Regular.otf",     font_bold: "NotoSerifJP-Bold.otf",     },
        { key: :mplus_rounded1c_sans, font_regular: "MPLUSRounded1c-Regular.ttf",  font_bold: "MPLUSRounded1c-Bold.ttf",  },
        { key: :noto_sans,            font_regular: "NotoSansJP-Regular.otf",      font_bold: "NotoSansJP-Bold.otf",      },
        { key: :yusei_magic_sans,     font_regular: "YuseiMagic-Regular.ttf",      font_bold: nil,                        },
      ]

      def to_params
        {
          :font_regular => font_regular,
          :font_bold    => font_bold,
        }
      end

      def font_regular
        if v = super
          ASSETS_DIR.join("fonts/#{v}")
        end
      end

      def font_bold
        if v = super
          ASSETS_DIR.join("fonts/#{v}")
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bioshogi-0.0.15 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.14 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.10 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.9 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.8 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.7 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.5 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.4 lib/bioshogi/screen_image/font_theme_info.rb
bioshogi-0.0.3 lib/bioshogi/screen_image/font_theme_info.rb