Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/harfbuzz/src/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 17 kB image not shown  

Quelle  hb-buffer-deserialize-text-glyphs.hh

  Sprache: C
 


#line 1 "hb-buffer-deserialize-text-glyphs.rl"
/*
 * Copyright © 2013  Google, Inc.
 *
 *  This is part of HarfBuzz, a text shaping library.
 *
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and its documentation for any purpose, provided that the
 * above copyright notice and the following two paragraphs appear in
 * all copies of this software.
 *
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 *
 * Google Author(s): Behdad Esfahbod
 */


#ifndef HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH
#define HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH

#include "hb.hh"


#line 36 "hb-buffer-deserialize-text-glyphs.hh"
static const unsigned char _deserialize_text_glyphs_trans_keys[] = {
 0u, 0u, 48u, 57u, 45u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 48u, 57u, 45u, 57u, 
 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 44u, 57u, 43u, 124u, 9u, 124u, 9u, 124u, 
 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 
 9u, 124u, 9u, 124u, 9u, 124u, 0
};

static const char _deserialize_text_glyphs_key_spans[] = {
 010131013101013
 10113101482116116
 116116116116116116116116
 116116116
};

static const short _deserialize_text_glyphs_index_offsets[] = {
 00112536506172
 869799113124139222339
 456573690807924104111581275
 139215091626
};

static const char _deserialize_text_glyphs_indicies[] = {
 0222222
 22213114
 55555555
 51677777
 77771811
 910101010101010
 101011112121212
 121212121211314
 1414141414141414
 1151116171717
 171717171717118
 1919191919191919
 191201211122
 2323232323232323
 231242525252525
 2525252512011
 119191919191919
 1919191262611
 11111111
 111111261
 126111111
 11111111
 11111111
 1111126261
 11111111
 11111111
 11111111
 1111126128
 2828282827272727
 2727272727272727
 2727272727272827
 2729272727272727
 273012727272727
 2727272727272727
 2727273127273227
 2727272727272727
 2727272727272727
 2727272727272727
 272733127272727
 2727272727272727
 2727272727272727
 2727272727272727
 2727282734343434
 3426262626262626
 2626262626262626
 2626263426263526
 262626262626361
 2626262626262626
 2626262626262626
 3726263826262626
 2626262626262626
 2626262626262626
 2626262626262639
 126262626262626
 2626262626262626
 2626262626262626
 2626262626262640
 26414141414111
 11111111
 11111111
 411111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11114214343
 43434311111
 11111111
 111114311
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 14414141414141
 11111111
 11111111
 114111111
 11111111
 11454545454545
 454545451111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 111111421
 4646464646111
 11111111
 111111146
 114711111
 111481111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 111491505050
 5050111111
 11111111
 1111501151
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 52150505050501
 11111111
 11111111
 1501151111
 11111111
 112121212121212
 12121211111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 1111152146
 464646461111
 11111111
 111111461
 147111111
 114811177
 77777777
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 1149153535353
 531111111
 11111111
 1115311541
 111111551
 11111111
 11111111
 111561111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 111111157
 1585858585811
 11111111
 11111111
 5811591111
 111601111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11116115858
 58585811111
 11111111
 111115811
 591111111
 601111252525
 252525252525251
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 16115353535353
 11111111
 11111111
 1153115411
 111115511
 11626262626262
 626262621111
 115611111
 11111111
 11111111
 11111111
 11111111
 11111111
 11111111
 111111571
 0
};

static const char _deserialize_text_glyphs_trans_targs[] = {
 16018319221922
 52021202123268
 91291210112425
 2425151514126
 71315126713
 141714171418171
 414171141712
 71417121426
};

static const char _deserialize_text_glyphs_trans_actions[] = {
 10111100
 11100111
 11002111
 00043555
 54677770
 688000910
 109111211131414
 1413151616150
};

static const char _deserialize_text_glyphs_eof_actions[] = {
 00000000
 00000036
 80891111913
 151513
};

static const int deserialize_text_glyphs_start = 14;
static const int deserialize_text_glyphs_first_final = 14;
static const int deserialize_text_glyphs_error = 0;

static const int deserialize_text_glyphs_en_main = 14;


#line 98 "hb-buffer-deserialize-text-glyphs.rl"


static hb_bool_t
_hb_buffer_deserialize_text_glyphs (hb_buffer_t *buffer,
        const char *buf,
        unsigned int buf_len,
        const char **end_ptr,
        hb_font_t *font)
{
  const char *p = buf, *pe = buf + buf_len, *eof = pe, *orig_pe = pe;

  /* Ensure we have positions. */
  (void) hb_buffer_get_glyph_positions (buffer, nullptr);

  while (p < pe && ISSPACE (*p))
    p++;
  if (p < pe && *p == (buffer->len ? '|' : '['))
    *end_ptr = ++p;

  const char *end = strchr ((char *) p, ']');
  if (end)
    pe = eof = end;
  else
  {
    end = strrchr ((char *) p, '|');
    if (end)
      pe = eof = end;
    else
      pe = eof = p;
  }

  const char *tok = nullptr;
  int cs;
  hb_glyph_info_t info = {0};
  hb_glyph_position_t pos = {0};
  
#line 353 "hb-buffer-deserialize-text-glyphs.hh"
 {
 cs = deserialize_text_glyphs_start;
 }

#line 358 "hb-buffer-deserialize-text-glyphs.hh"
 {
 int _slen;
 int _trans;
 const unsigned char *_keys;
 const char *_inds;
 if ( p == pe )
  goto _test_eof;
 if ( cs == 0 )
  goto _out;
_resume:
 _keys = _deserialize_text_glyphs_trans_keys + (cs<<1);
 _inds = _deserialize_text_glyphs_indicies + _deserialize_text_glyphs_index_offsets[cs];

 _slen = _deserialize_text_glyphs_key_spans[cs];
 _trans = _inds[ _slen > 0 && _keys[0] <=(*p) &&
  (*p) <= _keys[1] ?
  (*p) - _keys[0] : _slen ];

 cs = _deserialize_text_glyphs_trans_targs[_trans];

 if ( _deserialize_text_glyphs_trans_actions[_trans] == 0 )
  goto _again;

 switch ( _deserialize_text_glyphs_trans_actions[_trans] ) {
 case 1:
#line 51 "hb-buffer-deserialize-text-glyphs.rl"
 {
 tok = p;
}
 break;
 case 7:
#line 55 "hb-buffer-deserialize-text-glyphs.rl"
 {
 /* TODO Unescape delimiters. */
 if (!hb_font_glyph_from_string (font,
     tok, p - tok,
     &info.codepoint))
   return false;
}
 break;
 case 14:
#line 63 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_uint (tok, p, &info.cluster )) return false; }
 break;
 case 2:
#line 64 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.x_offset )) return false; }
 break;
 case 16:
#line 65 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.y_offset )) return false; }
 break;
 case 10:
#line 66 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.x_advance)) return false; }
 break;
 case 12:
#line 67 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.y_advance)) return false; }
 break;
 case 4:
#line 38 "hb-buffer-deserialize-text-glyphs.rl"
 {
 hb_memset (&info, 0sizeof (info));
 hb_memset (&pos , 0sizeof (pos ));
}
#line 51 "hb-buffer-deserialize-text-glyphs.rl"
 {
 tok = p;
}
 break;
 case 6:
#line 55 "hb-buffer-deserialize-text-glyphs.rl"
 {
 /* TODO Unescape delimiters. */
 if (!hb_font_glyph_from_string (font,
     tok, p - tok,
     &info.codepoint))
   return false;
}
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 13:
#line 63 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_uint (tok, p, &info.cluster )) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 15:
#line 65 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.y_offset )) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 9:
#line 66 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.x_advance)) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 11:
#line 67 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.y_advance)) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 8:
#line 68 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_uint (tok, p, &info.mask    )) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 5:
#line 38 "hb-buffer-deserialize-text-glyphs.rl"
 {
 hb_memset (&info, 0sizeof (info));
 hb_memset (&pos , 0sizeof (pos ));
}
#line 51 "hb-buffer-deserialize-text-glyphs.rl"
 {
 tok = p;
}
#line 55 "hb-buffer-deserialize-text-glyphs.rl"
 {
 /* TODO Unescape delimiters. */
 if (!hb_font_glyph_from_string (font,
     tok, p - tok,
     &info.codepoint))
   return false;
}
 break;
 case 3:
#line 38 "hb-buffer-deserialize-text-glyphs.rl"
 {
 hb_memset (&info, 0sizeof (info));
 hb_memset (&pos , 0sizeof (pos ));
}
#line 51 "hb-buffer-deserialize-text-glyphs.rl"
 {
 tok = p;
}
#line 55 "hb-buffer-deserialize-text-glyphs.rl"
 {
 /* TODO Unescape delimiters. */
 if (!hb_font_glyph_from_string (font,
     tok, p - tok,
     &info.codepoint))
   return false;
}
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
#line 554 "hb-buffer-deserialize-text-glyphs.hh"
 }

_again:
 if ( cs == 0 )
  goto _out;
 if ( ++p != pe )
  goto _resume;
 _test_eof: {}
 if ( p == eof )
 {
 switch ( _deserialize_text_glyphs_eof_actions[cs] ) {
 case 6:
#line 55 "hb-buffer-deserialize-text-glyphs.rl"
 {
 /* TODO Unescape delimiters. */
 if (!hb_font_glyph_from_string (font,
     tok, p - tok,
     &info.codepoint))
   return false;
}
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 13:
#line 63 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_uint (tok, p, &info.cluster )) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 15:
#line 65 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.y_offset )) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 9:
#line 66 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.x_advance)) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 11:
#line 67 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_int  (tok, p, &pos.y_advance)) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 8:
#line 68 "hb-buffer-deserialize-text-glyphs.rl"
 { if (!parse_uint (tok, p, &info.mask    )) return false; }
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
 case 3:
#line 38 "hb-buffer-deserialize-text-glyphs.rl"
 {
 hb_memset (&info, 0sizeof (info));
 hb_memset (&pos , 0sizeof (pos ));
}
#line 51 "hb-buffer-deserialize-text-glyphs.rl"
 {
 tok = p;
}
#line 55 "hb-buffer-deserialize-text-glyphs.rl"
 {
 /* TODO Unescape delimiters. */
 if (!hb_font_glyph_from_string (font,
     tok, p - tok,
     &info.codepoint))
   return false;
}
#line 43 "hb-buffer-deserialize-text-glyphs.rl"
 {
 buffer->add_info (info);
 if (unlikely (!buffer->successful))
   return false;
 buffer->pos[buffer->len - 1] = pos;
 *end_ptr = p;
}
 break;
#line 671 "hb-buffer-deserialize-text-glyphs.hh"
 }
 }

 _out: {}
 }

#line 136 "hb-buffer-deserialize-text-glyphs.rl"


  if (pe < orig_pe && *pe == ']')
  {
    pe++;
    if (p == pe)
      p++;
  }

  *end_ptr = p;

  return p == pe;
}

#endif /* HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH */

Messung V0.5 in Prozent
C=99 H=95 G=96

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-06-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.