chromium/third_party/blink/renderer/platform/text/unicode_range.h

/*
 * Copyright (C) 2007 Apple Computer, Inc.
 *
 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 *
 * Alternatively, the contents of this file may be used under the terms
 * of either the Mozilla Public License Version 1.1, found at
 * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public
 * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html
 * (the "GPL"), in which case the provisions of the MPL or the GPL are
 * applicable instead of those above.  If you wish to allow use of your
 * version of this file only under the terms of one of those two
 * licenses (the MPL or the GPL) and not to allow others to use your
 * version of this file under the LGPL, indicate your decision by
 * deletingthe provisions above and replace them with the notice and
 * other provisions required by the MPL or the GPL, as the case may be.
 * If you do not delete the provisions above, a recipient may use your
 * version of this file under any of the LGPL, the MPL or the GPL.
 */

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_UNICODE_RANGE_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_UNICODE_RANGE_H_

#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_uchar.h"

namespace blink {

// The following constants define unicode subranges
// values below cRangeNum must be continuous so that we can map to
// a lang group directly.
// All ranges we care about should fit within 32 bits.

// Frequently used range definitions
const unsigned char kCRangeCyrillic =;
const unsigned char kCRangeGreek =;
const unsigned char kCRangeTurkish =;
const unsigned char kCRangeHebrew =;
const unsigned char kCRangeArabic =;
const unsigned char kCRangeBaltic =;
const unsigned char kCRangeThai =;
const unsigned char kCRangeKorean =;
const unsigned char kCRangeJapanese =;
const unsigned char kCRangeSChinese =;
const unsigned char kCRangeTChinese =;
const unsigned char kCRangeDevanagari =;
const unsigned char kCRangeTamil =;
const unsigned char kCRangeArmenian =;
const unsigned char kCRangeBengali =;
const unsigned char kCRangeCanadian =;
const unsigned char kCRangeEthiopic =;
const unsigned char kCRangeGeorgian =;
const unsigned char kCRangeGujarati =;
const unsigned char kCRangeGurmukhi =;
const unsigned char kCRangeKhmer =;
const unsigned char kCRangeMalayalam =;

const unsigned char kCRangeSpecificItemNum =;

// range/rangeSet grow to this place 22-29

const unsigned char kCRangeSetStart =;  // range set definition starts from here
const unsigned char kCRangeSetLatin =;
const unsigned char kCRangeSetCJK =;
const unsigned char kCRangeSetEnd =;  // range set definition ends here

// less frequently used range definition
const unsigned char kCRangeSurrogate =;
const unsigned char kCRangePrivate =;
const unsigned char kCRangeMisc =;
const unsigned char kCRangeUnassigned =;
const unsigned char kCRangeSyriac =;
const unsigned char kCRangeThaana =;
const unsigned char kCRangeOriya =;
const unsigned char kCRangeTelugu =;
const unsigned char kCRangeKannada =;
const unsigned char kCRangeSinhala =;
const unsigned char kCRangeLao =;
const unsigned char kCRangeTibetan =;
const unsigned char kCRangeMyanmar =;
const unsigned char kCRangeCherokee =;
const unsigned char kCRangeOghamRunic =;
const unsigned char kCRangeMongolian =;
const unsigned char kCRangeMathOperators =;
const unsigned char kCRangeMiscTechnical =;
const unsigned char kCRangeControlOpticalEnclose =;
const unsigned char kCRangeBoxBlockGeometrics =;
const unsigned char kCRangeMiscSymbols =;
const unsigned char kCRangeDingbats =;
const unsigned char kCRangeBraillePattern =;
const unsigned char kCRangeYi =;
const unsigned char kCRangeCombiningDiacriticalMarks =;
const unsigned char kCRangeSpecials =;

const unsigned char kCRangeTableBase =;  // values over 127 are reserved for internal use only
const unsigned char kCRangeTertiaryTable =;  // leave room for 16 subtable
                                                 // indices (cRangeTableBase + 1
                                                 // .. cRangeTableBase + 16)

PLATFORM_EXPORT unsigned FindCharUnicodeRange(UChar32);

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_UNICODE_RANGE_H_