@@ -112,7 +112,7 @@ def _validate_chars(self, text):
112
112
def _get_rendered_size (self , text , line_h ):
113
113
line_h = self ._max_height if not line_h else line_h
114
114
text_w , text_h = (0 , 0 )
115
- lines = text .split (os . linesep )
115
+ lines = text .split (" \n " )
116
116
for line in lines :
117
117
line_w = 0
118
118
for c in line :
@@ -173,7 +173,7 @@ def remap(self, c, x, y, w, h):
173
173
def render (self , text , bpp = None ):
174
174
# Deprecated: replaced by render_text, which returns a surface
175
175
self ._validate_chars (text )
176
- lines = text .split (os . linesep )
176
+ lines = text .split (" \n " )
177
177
178
178
tw , th = self ._get_rendered_size (text , None )
179
179
if bpp is None :
@@ -198,7 +198,7 @@ def render_text(self, text, line_h=None, as_argb=True):
198
198
set the ``as_argb`` parameter to ``False``.
199
199
200
200
Args:
201
- text (str): The string of text to render to the target surface .
201
+ text (str): The string of text to render.
202
202
line_h (int, optional): The line height (in pixels) to use for each
203
203
line of the rendered text. If not specified, the maximum
204
204
character height for the font will be used. Defaults to ``None``.
@@ -211,7 +211,7 @@ def render_text(self, text, line_h=None, as_argb=True):
211
211
212
212
"""
213
213
self ._validate_chars (text )
214
- lines = text .split (os . linesep )
214
+ lines = text .split (" \n " )
215
215
216
216
# Create a new surface with the same format as the font image
217
217
tw , th = self ._get_rendered_size (text , line_h )
@@ -281,7 +281,7 @@ def contains(self, c):
281
281
282
282
def can_render (self , text ):
283
283
# Deprecated: already throws informative exception on missing character
284
- lines = text .split (os . linesep )
284
+ lines = text .split (" \n " )
285
285
for line in lines :
286
286
for c in line :
287
287
if c != ' ' and c not in self .offsets :
0 commit comments