# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../cuneiform/hocr2.patch # Copyright (C) 2010 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- cuneiform-linux-1.0.0/cuneiform_src/Kern/rout/src/html.cpp.vanilla 2010-11-25 11:18:50.000000000 +0100 +++ cuneiform-linux-1.0.0/cuneiform_src/Kern/rout/src/html.cpp 2010-11-25 11:49:28.000000000 +0100 @@ -228,9 +228,6 @@ static Byte* pLineStart = 0; //! \~english is the ptr to the location that gMemCur pointed to when reason was BROWSE_LINE_START - static std::vector currentLineCharBBoxes; - currentLineCharBBoxes.reserve(200); - // В конце вызывается WordControl @@ -246,11 +243,14 @@ FontStyle(CED_GetCharFontAttribs(hObject)); r = CED_GetCharLayout(hObject); - currentLineCharBBoxes.push_back(r); // Записать символ if(isGoodCharRect(r) && hocrmode) { + sprintf(buf, "", + r.left, r.top, r.right, r.bottom); + PUT_STRING(buf); + if (0 == isInLine) // начнем определение границ строки { @@ -276,6 +276,9 @@ } ONE_CHAR(hObject); + if(r.left != -1 && hocrmode) + PUT_STRING(""); + break; } case BROWSE_LINE_START: @@ -286,17 +289,8 @@ case BROWSE_LINE_END: // Конец строки текста - if (hocrmode) - writeHocrLineStartTag(pLineStart, rcLine, iLine); FontStyle(0); - // write character bounding boxes info - if (currentLineCharBBoxes.size()) - if (hocrmode) - writeHocrCharBBoxesInfo(currentLineCharBBoxes, iLine); - currentLineCharBBoxes.resize(0); - - isInLine = false; if ( gPreserveLineBreaks || gEdLineHardBreak ) { @@ -304,8 +298,6 @@ } iLine++; - // close HocrLine tag - PUT_STRING(""); NEW_LINE; break;