Sha256: 726ef7d1185ba7df6a6161efe0d2956301d866d1a30618806d1d5dcdb52b2bc1

Contents?: true

Size: 688 Bytes

Versions: 2

Compression:

Stored size: 688 Bytes

Contents

# encoding: utf-8

# WizRft:  A gem for exporting Word Documents in ruby
# using the Microsoft Rich Text Format (RTF) Specification
# Copyright (C) 2015 by sgzhe@163.com

module WizRtf
  class Font
    def initialize(num, family, name, character_set = 0, prq = 2)
      @num = num
      @family = family
      @name = name
      @character_set = character_set
      @prq = prq
    end

    def render(io)
      io.group do
        io.delimit do
          io.cmd :f, @num
          io.cmd @family
          io.cmd :fprq, @prq
          io.cmd :fcharset, @character_set
          io.write ' '
          io.write @name
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wiz_rtf-0.5.5 lib/wiz_rtf/font.rb
wiz_rtf-0.5.0 lib/wiz_rtf/font.rb