Cairo__FontWeight.st
author Jan Vrany <jan.vrany@labware.com>
Mon, 15 Jun 2020 15:16:56 +0100
changeset 90 b808c338d5c3
parent 88 9d51db2ba641
permissions -rw-r--r--
Fix `SimpleView >> redrawWithCairoBuffered:...` after an API change ...which happened a loong time ago but went unnoticed.

"
stx:goodies/libcairo - Cairo graphics bindings for Smalltalk/X

Copyright (C) 2008-2019 Jan Vrany

This code is licensed under Creative Commons Attribution-NonCommercial License.
For full text of the license, see file LICENSE.txt
"
"{ Package: 'stx:goodies/libcairo' }"

"{ NameSpace: Cairo }"

SharedPool subclass:#FontWeight
	instanceVariableNames:''
	classVariableNames:'CAIRO_FONT_WEIGHT_NORMAL CAIRO_FONT_WEIGHT_BOLD
		SymbolicFontFaceToCairoFontWeightMap'
	poolDictionaries:''
	category:'Cairo-Constants'
!

!FontWeight class methodsFor:'documentation'!

copyright
"
stx:goodies/libcairo - Cairo graphics bindings for Smalltalk/X

Copyright (C) 2008-2019 Jan Vrany

This code is licensed under Creative Commons Attribution-NonCommercial License.
For full text of the license, see file LICENSE.txt
"
! !

!FontWeight class methodsFor:'initialization'!

initialize

    CAIRO_FONT_WEIGHT_NORMAL := 0.
    CAIRO_FONT_WEIGHT_BOLD := 1.

    SymbolicFontFaceToCairoFontWeightMap := Dictionary new.
    SymbolicFontFaceToCairoFontWeightMap at: 'normal' put: CAIRO_FONT_WEIGHT_NORMAL.
    SymbolicFontFaceToCairoFontWeightMap at: 'regular' put: CAIRO_FONT_WEIGHT_NORMAL.
    SymbolicFontFaceToCairoFontWeightMap at: 'medium' put: CAIRO_FONT_WEIGHT_NORMAL.
    SymbolicFontFaceToCairoFontWeightMap at: 'bolf' put: CAIRO_FONT_WEIGHT_BOLD

    "Modified: / 09-01-2015 / 15:23:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!FontWeight class methodsFor:'constants'!

CAIRO_FONT_WEIGHT_BOLD

    ^CAIRO_FONT_WEIGHT_BOLD
!

CAIRO_FONT_WEIGHT_NORMAL

    ^CAIRO_FONT_WEIGHT_NORMAL
! !


FontWeight initialize!