Input is in this format:
image fontwidth fontheight rowwidth xoffset yoffset xgap ygap non-existent charstart thetextitself
thetextitself: The text that should be rendered from the image.
image: The image filename. Implementation may vary; it could be either the filename from your computer, an image URL, or something else, as long as it's possible to use any picture.
fontwidth, fontheight: self explanatory
rowwidth: How many characters a row of characters contains in the image?
xoffset: The starting x coordinate of the character table.
yoffset: The starting y coordinate of the character table.
xgap: The horizontal gap between characters.
ygap: The vertical gap between characters.
non-existent: The character code for the character rendered if the character is (fully or partially) outside the image, hexadecimal of any length.
charstart: The hexadecimal first character any length.
thetextitself: The text to render. The previous parameters are used to find the characters. It's at the end, so that any space included doesn't clash with the next parameter.
So, the appropriate input for this image would be:
https://i.sstatic.net/E8FBP.png 7 11 8 3 5 2 1 00000000 00000 <Test>
which would render as . The exact pixel colors are preserved.
Word wrapping is not needed, but if you use word wrapping, there must be at least 16 characters of horizontal space.
-10 bytes if the code renders tabs (U+0009) correctly (jumps to the next position divisible by 8).
-10 bytes if the code renders Microsoft Windows newlines (U+000D000A) correctly (extends the output image height and jumps to the beginning of the last line).
-10 bytes if the code interprets the combining and zero–width characters as zero–width, but combining characters overlapping their glyph to the next (or the previous; I don't know how Unicode combining characters work) character.
The code must support Unicode characters up to U+FFFF. If the code allows for characters above, -10 bytes.
It's , so the lowest code size wins.
fontwidth
,xoffset
xgap
etc? Are there any bounds on their range? If not, how should text be displayed with e.g.fondwith=2
andfontheight=100
? \$\endgroup\$1
Get rid of the bonuses please. See Sanchises' comment above.2
Which image formats must be supported? \$\endgroup\$