Ticket #6385 (new defect)

SVN Diffs for #6385

 

Opened 7 months ago

Last modified 6 months ago

Page 386 of the user manual seems to be missing some code.

Reported by: anonymous Assigned to: jspieth
Priority: minor Milestone: 4.2
Component: layout Version: on-line docs
Keywords: Cc:
Load: Xref:
Java Version: Operating System:
Project (C/J): all Weeks:
Review:

Description

On page 386 of the ICU user manual (and in fact the web page related to the layout engine) there is a line "The following example shows how to use the LayoutEngine to process the text:"

Following this is a line break, and then "This previous example computes three arrays: an array of glyph indices in display order, an array of x, y position pairs for each glyph, and an array that maps each output glyph back to the input text array. Use the following get methods to copy these arrays: "

Followed by some code. Now I believe a bit of code is missing here! Which is unfortunate as I'm trying to get to grips with the layout engine!

Thanks, Sam

Attachments

Change History

06/24/08 21:01:13 changed by thesquib@...

Added: My email

06/25/08 13:16:33 changed by srl

  • owner changed from somebody to eric.
  • weeks changed.
  • xref changed.
  • revw changed.

06/25/08 13:20:31 changed by eric

There are two proceeding code examples that are missing. I looked at the oldest version of this section that I could find in SVN, and they're just gone. Looks like they'll have to be recreated from scratch.

06/25/08 14:00:54 changed by srl

  • milestone changed from UNSCH to 4.2.

07/08/08 02:39:49 changed by icu@...

Here they are:

http://web.archive.org/web/20040209045054/oss.software.ibm.com/icu/userguide/layoutEngine.html

LEFontInstace *font   = <the text's font>; 
UScriptCode    script = <the text's script>;
LEErrorCode    error  = LE_NO_ERROR;
LayoutEngine  *engine;

engine = LayoutEngine::layoutEngineFactory(font,
                                         script,
                                         0,  // language - ignored
                                         error);

LEUnicode text[] = <the text to process>; 

le_int32 offset  = <the starting offset of the text to process>;
le_int32 count   = <the number of code points to process>;
le_int32 max     = <the total number of characters in text>;
le_bool  rtl     = <true if the text is right-to-left, false otherwise>;
float    x, y    = <starting x, y position of the text>;
le_int32 glyphCount;

glyphCount = engine->layoutChars(text, offset, count, max, rtl,
                                               x, y, error);

07/21/08 09:11:50 changed by hchapman

  • priority changed from assess to minor.

07/22/08 10:28:52 changed by hchapman

  • owner changed from eric to jspieth.

Add/Change #6385 (Page 386 of the user manual seems to be missing some code.)




Anti spam check: