Example #1
0
        public int addPageNumberCitation(string refid, LinkSet ls)
        {
            int width = currentFontState.GetWidth(currentFontState.MapCharacter(' '));


            PageNumberInlineArea pia = new PageNumberInlineArea(currentFontState,
                                                                this.red, this.green, this.blue, refid, width);

            pia.setYOffset(placementOffset);
            pendingAreas.Add(pia);
            pendingWidth += width;
            prev          = TEXT;

            return(-1);
        }
Example #2
0
        public void WriteText(char[] textBuffer, int start, int len)
        {
            for (int index = start; index < len; ++index)
            {
                //get glyph index from current font?
                ushort ch = _fontState.MapCharacter(textBuffer[index]);

                if (!_useMultibyte)
                {
                    if (ch > 127)
                    {
                        _tmpstBuilder.Append("\\");
                        _tmpstBuilder.Append(Convert.ToString((int)ch, 8));
                    }
                    else
                    {
                        switch (ch)
                        {
                        case '(':
                        case ')':
                        case '\\':
                            _tmpstBuilder.Append("\\");
                            break;
                        }
                        _tmpstBuilder.Append((char)ch);
                    }
                }
                else
                {
                    _tmpstBuilder.Append(GetUnicodeString(ch));
                }

                if (kerningAvailable && (index + 1) < len)
                {
                    ushort ch2 = _fontState.MapCharacter(textBuffer[index + 1]);
                    AddKerning(_tmpstBuilder, ch, ch2, kerning, startText, endText);
                }
            }
        }