Next / Previous / Contents / Shipman's homepage

7.5. Controls.setFamily(): Change font family name

This method changes self's family name.

fontselect.py
    def setFamily(self, newFamily):
        """Sets self's font family name.
        """
        #-- 1 --
        self._currentFamily = newFamily

        #-- 2 --
        # [ if self's controls describe a valid font ->
        #     self  :=  self displaying that new font
        #     call self's observers with that new font
        #   else ->
        #     pop up an error dialog ]
        self._setFont()