diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-10 18:25:09 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-10 18:25:09 +0000 |
commit | db8ec60fc04930a0dc03a67853af9cffaf4fc4bf (patch) | |
tree | 3860245da734e728a1fc287f1cfe05c965fb4088 | |
parent | 484365874292b4c70abf91642cce83898c9a2d3a (diff) | |
download | netsurf-db8ec60fc04930a0dc03a67853af9cffaf4fc4bf.tar.gz netsurf-db8ec60fc04930a0dc03a67853af9cffaf4fc4bf.tar.bz2 |
Update nsfont_split documentation. Implementation was already compatible. Can only split on spaces.
-rw-r--r-- | riscos/font.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/riscos/font.c b/riscos/font.c index 8d4c6d337..b949a570d 100644 --- a/riscos/font.c +++ b/riscos/font.c @@ -319,15 +319,22 @@ bool nsfont_position_in_string(const plot_font_style_t *fstyle, * * \param fstyle style for this text * \param string UTF-8 string to measure - * \param length length of string + * \param length length of string, in bytes * \param x width available - * \param char_offset updated to offset in string of actual_x, [0..length] + * \param char_offset updated to offset in string of actual_x, [1..length] * \param actual_x updated to x coordinate of character closest to x * \return true on success, false on error and error reported * - * On exit, [char_offset == 0 || - * string[char_offset] == ' ' || - * char_offset == length] + * On exit, char_offset indicates first character after split point. + * + * Note: char_offset of 0 should never be returned. + * + * Returns: + * char_offset giving split point closest to x, where actual_x <= x + * else + * char_offset giving split point closest to x, where actual_x > x + * + * Returning char_offset == length means no split possible */ bool nsfont_split(const plot_font_style_t *fstyle, |