File: font_index_spec.rb

package info (click to toggle)
ruby-ttfunk 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,472 kB
  • sloc: ruby: 7,954; makefile: 7
file content (15 lines) | stat: -rw-r--r-- 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'spec_helper'
require 'ttfunk/table/cff'

RSpec.describe TTFunk::Table::Cff::FontIndex do
  let(:font) { TTFunk::File.open(font_path) }
  let(:font_index) { font.cff.top_index[0].font_index }
  let(:font_path) { test_font('NotoSansCJKsc-Thin', :otf) }

  it 'provides access to font dicts by index' do
    expect(font_index.items_count).to eq(19)
    expect(font_index[0]).to be_a(TTFunk::Table::Cff::FontDict)
  end
end