def get_string_width(self, s):
s = self.normalize_text(s)<EOL>cw=self.current_font['<STR_LIT>']<EOL>w=<NUM_LIT:0><EOL>l=len(s)<EOL>if self.unifontsubset:<EOL><INDENT>for char in s:<EOL><INDENT>char = ord(char)<EOL>if len(cw) > char:<EOL><INDENT>w += cw[char] <EOL><DEDENT>elif (self.current_font['<STR_LIT>']['<STR_LIT>']) :<EOL><INDENT>w += self.current_font['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>w += <NUM_LIT><EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for i in range(<NUM_LIT:0>, l):<EOL><INDENT>w += cw.get(s[i],<NUM_LIT:0>)<EOL><DEDENT><DEDENT>return w*self.font_size/<NUM_LIT><EOL>
Get width of a string in the current font