Module: Mml::Base::DeprecatedFontAttributes

Included in:
V2::Mstyle, V3::Mglyph, V3::Mi, V3::Mn, V3::Mo, V3::Ms, V3::Mspace, V3::Mstyle, V3::Mtext
Defined in:
lib/mml/base/deprecated_font_attributes.rb

Overview

Deprecated MathML 1 font attributes: fontfamily, fontweight, fontstyle, fontsize, color, background. These are removed in MathML 4 default schema but valid in mathml4-legacy.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/mml/base/deprecated_font_attributes.rb', line 9

def self.included(klass)
  klass.class_eval do
    attribute :fontfamily, :string
    attribute :fontweight, :string
    attribute :fontstyle, :string
    attribute :fontsize, :string
    attribute :color, :string
    attribute :background, :string

    xml do
      namespace Mml::Namespace
      map_attribute "fontfamily", to: :fontfamily
      map_attribute "fontweight", to: :fontweight
      map_attribute "fontstyle", to: :fontstyle
      map_attribute "fontsize", to: :fontsize
      map_attribute "color", to: :color
      map_attribute "background", to: :background
    end
  end
end