コード例 #1
0
ファイル: ieee.py プロジェクト: MathB/rinohtype
                   GroupedFlowables, StaticGroupedFlowables, Header, Footer,
                   Figure, Caption, Tabular, Framed, HorizontalRule,
                   NoteMarker, Note, TableOfContents, TableOfContentsEntry,
                   Line, TabStop, DEFAULT, LEFT, RIGHT, CENTER, BOTH, MIDDLE,
                   NUMBER, ROMAN_UC, CHARACTER_UC, SYMBOL, PT, INCH, CM, RED,
                   Color, Gray)

from rinoh.font import TypeFamily
from rinoh.font.style import REGULAR, ITALIC, BOLD, SUPERSCRIPT

from rinohlib.fonts.texgyre.termes import typeface as times
from rinohlib.fonts.texgyre.cursor import typeface as courier

ieee_family = TypeFamily(serif=times, mono=courier)

styles = StyleSheet('IEEE')

styles('body',
       ClassSelector(Paragraph),
       typeface=ieee_family.serif,
       font_weight=REGULAR,
       font_size=10 * PT,
       line_spacing=FixedSpacing(12 * PT),
       indent_first=0.125 * INCH,
       space_above=0 * PT,
       space_below=0 * PT,
       justify=BOTH,
       kerning=True,
       ligatures=True,
       hyphen_lang='en_US',
       hyphen_chars=4)
コード例 #2
0
ファイル: rinascimento.py プロジェクト: frol/rinohtype
from rinoh import (StyleSheet, ClassSelector, ContextSelector,
                   GroupedFlowables, StyledText, Paragraph, Heading, List,
                   ListItem, DefinitionList, DEFAULT, LEFT, CENTER, RIGHT,
                   BOTH, NUMBER, PT, CM)

from rinoh.font import TypeFamily
from rinoh.font.style import REGULAR, ITALIC

from rinohlib.fonts.texgyre.pagella import typeface as pagella
from rinohlib.fonts.texgyre.cursor import typeface as cursor

fontFamily = TypeFamily(serif=pagella, mono=cursor)

styles = StyleSheet('Rinascimento')

styles(
    'body',
    ClassSelector(Paragraph),
    typeface=fontFamily.serif,
    font_weight=REGULAR,
    font_size=10 * PT,
    line_spacing=DEFAULT,
    #indent_first=0.125*INCH,
    space_above=0 * PT,
    space_below=10 * PT,
    justify=BOTH)

styles('title',
       ClassSelector(Paragraph, 'title'),
       typeface=fontFamily.serif,
       font_size=16 * PT,
コード例 #3
0
from rinoh import (StyleSheet, Var, ParagraphStyle, PT, CM, INCH, LEFT, RIGHT,
                   CENTER, BOTH, TOP, BOTTOM, MIDDLE, FixedWidthSpace, TabStop,
                   FixedSpacing, ProportionalSpacing, ROMAN_UC, CHARACTER_UC,
                   NUMBER, SYMBOL, Color, Gray, RED, BLUE, GRAY90, GRAY50)
from rinoh.color import BLACK
from rinoh.font import TypeFamily
from rinoh.font.style import REGULAR, UPRIGHT, ITALIC, BOLD, SUPERSCRIPT

from rinohlib.fonts.texgyre.termes import typeface as times
from rinohlib.fonts.texgyre.cursor import typeface as courier
from rinohlib.fonts.texgyre.heros import typeface as helvetica

from .matcher import matcher

styles = StyleSheet('IEEE', matcher=matcher)

styles.variables['ieee_family'] = TypeFamily(serif=times,
                                             sans=helvetica,
                                             mono=courier)

styles['default'] = ParagraphStyle(typeface=Var('ieee_family').serif,
                                   font_weight=REGULAR,
                                   font_size=10 * PT,
                                   line_spacing=FixedSpacing(12 * PT),
                                   indent_first=0 * PT,
                                   space_above=0 * PT,
                                   space_below=0 * PT,
                                   justify=BOTH,
                                   kerning=True,
                                   ligatures=True,
                                   hyphen_lang='en_US',
コード例 #4
0
ファイル: ieee.py プロジェクト: JanezStupar/rinohtype
    Gray,
    RED,
    BLUE,
    GRAY90,
    GRAY50,
)
from rinoh.font import TypeFamily
from rinoh.font.style import REGULAR, UPRIGHT, ITALIC, BOLD, SUPERSCRIPT

from rinohlib.fonts.texgyre.termes import typeface as times
from rinohlib.fonts.texgyre.cursor import typeface as courier
from rinohlib.fonts.texgyre.heros import typeface as helvetica

from .matcher import matcher

styles = StyleSheet("IEEE", matcher=matcher)

styles.variables["ieee_family"] = TypeFamily(serif=times, sans=helvetica, mono=courier)

styles["default"] = ParagraphStyle(
    typeface=Var("ieee_family").serif,
    font_weight=REGULAR,
    font_size=10 * PT,
    line_spacing=FixedSpacing(12 * PT),
    indent_first=0 * PT,
    space_above=0 * PT,
    space_below=0 * PT,
    justify=BOTH,
    kerning=True,
    ligatures=True,
    hyphen_lang="en_US",
コード例 #5
0
ファイル: sphinx.py プロジェクト: ascribe/rinohtype
    Gray,
    RED,
    BLUE,
    GRAY90,
    GRAY50,
)
from rinoh.font import TypeFamily
from rinoh.font.style import REGULAR, ITALIC, BOLD, SUPERSCRIPT

from rinohlib.fonts.texgyre.pagella import typeface as palatino
from rinohlib.fonts.texgyre.cursor import typeface as courier
from rinohlib.fonts.texgyre.heros import typeface as helvetica

from .matcher import matcher

stylesheet = StyleSheet("Sphinx", matcher=matcher)

stylesheet.variables["fonts"] = TypeFamily(serif=palatino, sans=helvetica, mono=courier)

stylesheet["default"] = ParagraphStyle(
    typeface=Var("fonts").serif,
    font_weight=REGULAR,
    font_size=10 * PT,
    line_spacing=FixedSpacing(12 * PT),
    indent_first=0 * PT,
    space_above=0 * PT,
    space_below=0 * PT,
    justify=BOTH,
    kerning=True,
    ligatures=True,
    hyphen_lang="en_US",