Skip to content

Commit

Permalink
fix #703
Browse files Browse the repository at this point in the history
  • Loading branch information
zyddnys committed Nov 30, 2024
1 parent 20808d2 commit e406228
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions manga_translator/rendering/text_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,7 @@ def put_text_vertical(font_size: int, text: str, h: int, alignment: str, fg: Tup
canvas_border = np.clip(canvas_border, 0, 255)
line_box = add_color(canvas_text, fg, canvas_border, bg)
# rect
if bg is None :
x, y, w, h = cv2.boundingRect(canvas_text)
else :
x, y, w, h = cv2.boundingRect(canvas_border)
x, y, w, h = cv2.boundingRect(canvas_border)
return line_box[y:y+h, x:x+w]

def select_hyphenator(lang: str):
Expand Down

0 comments on commit e406228

Please sign in to comment.