1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef MATHMLTEXTRUNFACTORY_H_
7 #define MATHMLTEXTRUNFACTORY_H_
9 #include "nsTextRunTransformations.h"
12 * Builds textruns that render their text with MathML specific renderings.
14 class MathMLTextRunFactory
: public nsTransformingTextRunFactory
{
16 MathMLTextRunFactory(nsTransformingTextRunFactory
* aInnerTransformingTextRunFactory
,
17 uint32_t aFlags
, uint8_t aSSTYScriptLevel
,
19 : mInnerTransformingTextRunFactory(aInnerTransformingTextRunFactory
),
21 mFontInflation(aFontInflation
),
22 mSSTYScriptLevel(aSSTYScriptLevel
) {}
24 virtual void RebuildTextRun(nsTransformedTextRun
* aTextRun
,
25 gfxContext
* aRefContext
,
26 gfxMissingFontRecorder
* aMFR
) MOZ_OVERRIDE
;
28 // Style effects which may override single character <mi> behaviour
29 MATH_FONT_STYLING_NORMAL
= 0x1, // fontstyle="normal" has been set.
30 MATH_FONT_WEIGHT_BOLD
= 0x2, // fontweight="bold" has been set.
31 MATH_FONT_FEATURE_DTLS
= 0x4, // font feature dtls should be set
35 nsAutoPtr
<nsTransformingTextRunFactory
> mInnerTransformingTextRunFactory
;
38 uint8_t mSSTYScriptLevel
;
41 #endif /*MATHMLTEXTRUNFACTORY_H_*/