Skip to content

Conversation

@i164j9
Copy link

@i164j9 i164j9 commented Mar 21, 2023

added a font file from: https://fonts.google.com/specimen/Roboto+Flex?query=Roboto
changed main() to give the option to have text or not by changing commented lines
text is only added when there is a font file specified
renamed sample Aztec code and added a second sample

i164j9 added 2 commits March 21, 2023 12:24
added a font file from: https://fonts.google.com/specimen/Roboto+Flex?query=Roboto
changed main() to give the option to have text or not
by changing commented lines
text is only added when there is a font file specified
renamed sample aztec code and added a second sample
"""

def __init__(self, data, size=None, compact=None):
def __init__(self, data, fontfile=None, size=None, compact=None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add fontfile to docstring.

(x * module_size, y * module_size,
x * module_size + module_size, y * module_size + module_size),
fill=(0, 0, 0) if self.matrix[y][x] == '#' else (255, 255, 255))
if self.my_font != None:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use is not None:

data_cw_count = self.__add_data(self.data)
self.__add_mode_info(data_cw_count)

def add_text(self, img_obj, text, module_size = 4):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format the code and add arguments to docstring.

README.md Outdated
Comment on lines 13 to 14
#to add text:
aztec_code = AztecCode(data,fontfile='path/to/your/font.ttf')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format this lines according to pep8.

i164j9 added 2 commits April 16, 2023 10:27
fixed docstring
fixed line 600 - if self.my_font is not None:
fixed formatting in README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants