Skip to content

Commit

Permalink
Point to @pdf-lib/* dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopding committed Dec 19, 2018
1 parent 3e920a5 commit cc4b9b3
Show file tree
Hide file tree
Showing 73 changed files with 115 additions and 100 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
"layout"
],
"dependencies": {
"@pdf-lib/brotli": "^0.0.0",
"@pdf-lib/restructure": "^0.0.0",
"@pdf-lib/unicode-properties": "^0.0.0",
"base64-arraybuffer": "^0.1.5",
"brotli": "git+https://github.com/Hopding/brotli.js.git#2a623817f6bd8d1f7f528f69ac8ce8067b3383fb",
"clone": "^1.0.1",
"deep-equal": "^1.0.0",
"dfa": "^1.0.0",
"iconv-lite": "^0.4.13",
"pako": "^1.0.6",
"restructure": "git+https://github.com/Hopding/restructure.git#6f9fd535c3914685a55002ef9b48e08a684b9bec",
"tiny-inflate": "^1.0.2",
"unicode-properties": "git+https://github.com/Hopding/unicode-properties.git#51a63d54730b78507206f07d19bd04186e5cffe7",
"unicode-trie": "^0.3.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/DFont.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import TTFFont from './TTFFont';

let DFontName = new r.String(r.uint8);
Expand Down
2 changes: 1 addition & 1 deletion src/TTFFont.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import { cache } from './decorators';
import fontkit from './base';
import Directory from './tables/directory';
Expand Down
2 changes: 1 addition & 1 deletion src/TrueTypeCollection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import TTFFont from './TTFFont';
import Directory from './tables/directory';
import tables from './tables';
Expand Down
4 changes: 2 additions & 2 deletions src/WOFF2Font.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import r from 'restructure';
import brotli from 'brotli/decompress';
import r from '@pdf-lib/restructure';
import brotli from '@pdf-lib/brotli/decompress';
import TTFFont from './TTFFont';
import TTFGlyph, { Point } from './glyph/TTFGlyph';
import WOFF2Glyph from './glyph/WOFF2Glyph';
Expand Down
2 changes: 1 addition & 1 deletion src/WOFFFont.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import TTFFont from './TTFFont';
import WOFFDirectory from './tables/WOFFDirectory';
import tables from './tables';
import inflate from 'tiny-inflate';
import r from 'restructure';
import r from '@pdf-lib/restructure';

export default class WOFFFont extends TTFFont {
static probe(buffer) {
Expand Down
2 changes: 1 addition & 1 deletion src/base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

const formats = [];

Expand Down
4 changes: 2 additions & 2 deletions src/cff/CFFDict.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isEqual from 'deep-equal';
import r from 'restructure';
import r from '@pdf-lib/restructure';
import CFFOperand from './CFFOperand';
import { PropertyDescriptor } from 'restructure/src/utils';
import { PropertyDescriptor } from '@pdf-lib/restructure/src/utils';

export default class CFFDict {
constructor(ops = []) {
Expand Down
2 changes: 1 addition & 1 deletion src/cff/CFFFont.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import CFFIndex from './CFFIndex';
import CFFTop from './CFFTop';
import CFFPrivateDict from './CFFPrivateDict';
Expand Down
2 changes: 1 addition & 1 deletion src/cff/CFFIndex.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

export default class CFFIndex {
constructor(type) {
Expand Down
2 changes: 1 addition & 1 deletion src/cff/CFFPointer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

export default class CFFPointer extends r.Pointer {
constructor(type, options = {}) {
Expand Down
4 changes: 2 additions & 2 deletions src/cff/CFFTop.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import r from 'restructure';
import { resolveLength } from 'restructure/src/utils';
import r from '@pdf-lib/restructure';
import { resolveLength } from '@pdf-lib/restructure/src/utils';
import CFFDict from './CFFDict';
import CFFIndex from './CFFIndex';
import CFFPointer from './CFFPointer';
Expand Down
2 changes: 1 addition & 1 deletion src/glyph/Glyph.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cache } from '../decorators';
import Path from './Path';
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';
import StandardNames from './StandardNames';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/glyph/SBIXGlyph.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import TTFGlyph from './TTFGlyph';
import r from 'restructure';
import r from '@pdf-lib/restructure';

let SBIXImage = new r.Struct({
originX: r.uint16,
Expand Down
2 changes: 1 addition & 1 deletion src/glyph/TTFGlyph.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Glyph from './Glyph';
import Path from './Path';
import BBox from './BBox';
import r from 'restructure';
import r from '@pdf-lib/restructure';

// The header for both simple and composite glyphs
let GlyfHeader = new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/glyph/TTFGlyphEncoder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// Flags for simple glyphs
const ON_CURVE = 1 << 0;
Expand Down
2 changes: 1 addition & 1 deletion src/layout/LayoutEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import UnicodeLayoutEngine from './UnicodeLayoutEngine';
import GlyphRun from './GlyphRun';
import GlyphPosition from './GlyphPosition';
import * as Script from './Script';
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';
import AATLayoutEngine from '../aat/AATLayoutEngine';
import OTLayoutEngine from '../opentype/OTLayoutEngine';

Expand Down
2 changes: 1 addition & 1 deletion src/layout/Script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';

// This maps the Unicode Script property to an OpenType script tag
// Data from http://www.microsoft.com/typography/otspec/scripttags.htm
Expand Down
2 changes: 1 addition & 1 deletion src/layout/UnicodeLayoutEngine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';

/**
* This class is used when GPOS does not define 'mark' or 'mkmk' features
Expand Down
2 changes: 1 addition & 1 deletion src/opentype/GlyphInfo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';
import OTProcessor from './OTProcessor';

export default class GlyphInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/opentype/shapers/ArabicShaper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DefaultShaper from './DefaultShaper';
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';
import UnicodeTrie from 'unicode-trie';
import pako from 'pako';
import * as base64 from 'base64-arraybuffer';
Expand Down
2 changes: 1 addition & 1 deletion src/opentype/shapers/DefaultShaper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';

const VARIATION_FEATURES = ['rvrn'];
const COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];
Expand Down
2 changes: 1 addition & 1 deletion src/opentype/shapers/IndicShaper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DefaultShaper from './DefaultShaper';
import StateMachine from 'dfa';
import UnicodeTrie from 'unicode-trie';
import unicode from 'unicode-properties';
import unicode from '@pdf-lib/unicode-properties';
import pako from 'pako';
import * as base64 from 'base64-arraybuffer';
import * as Script from '../../layout/Script';
Expand Down
2 changes: 1 addition & 1 deletion src/subset/Subset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

export default class Subset {
constructor(font) {
Expand Down
2 changes: 1 addition & 1 deletion src/tables/BASE.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';
import {ItemVariationStore} from './variations';

Expand Down
2 changes: 1 addition & 1 deletion src/tables/COLR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let LayerRecord = new r.Struct({
gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top).
Expand Down
2 changes: 1 addition & 1 deletion src/tables/CPAL.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let ColorRecord = new r.Struct({
blue: r.uint8,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/DSIG.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let Signature = new r.Struct({
format: r.uint32,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/EBDT.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

export let BigMetrics = new r.Struct({
height: r.uint8,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/EBLC.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import {BigMetrics} from './EBDT';

let SBitLineMetrics = new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/tables/GDEF.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';
import {ItemVariationStore} from './variations';

Expand Down
2 changes: 1 addition & 1 deletion src/tables/GPOS.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';
import {FeatureVariations} from './variations';

Expand Down
2 changes: 1 addition & 1 deletion src/tables/GSUB.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';
import {FeatureVariations} from './variations';

Expand Down
4 changes: 2 additions & 2 deletions src/tables/HVAR.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import r from 'restructure';
import {resolveLength} from 'restructure/src/utils';
import r from '@pdf-lib/restructure';
import {resolveLength} from '@pdf-lib/restructure/src/utils';
import {ItemVariationStore} from './variations';

// TODO: add this to restructure
Expand Down
2 changes: 1 addition & 1 deletion src/tables/JSTF.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';
import { GPOSLookup } from './GPOS';

Expand Down
2 changes: 1 addition & 1 deletion src/tables/LTSH.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// Linear Threshold table
// Records the ppem for each glyph at which the scaling becomes linear again,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/OS2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

var OS2 = new r.VersionedStruct(r.uint16, {
header: {
Expand Down
2 changes: 1 addition & 1 deletion src/tables/PCLT.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// PCL 5 Table
// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines
Expand Down
2 changes: 1 addition & 1 deletion src/tables/VDMX.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// VDMX tables contain ascender/descender overrides for certain (usually small)
// sizes. This is needed in order to match font metrics on Windows.
Expand Down
2 changes: 1 addition & 1 deletion src/tables/VORG.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let VerticalOrigin = new r.Struct({
glyphIndex: r.uint16,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/WOFF2Directory.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

const Base128 = {
decode(stream) {
Expand Down
2 changes: 1 addition & 1 deletion src/tables/WOFFDirectory.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import tables from './';

let WOFFDirectoryEntry = new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/tables/aat.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

class UnboundedArrayAccessor {
constructor(type, stream, parent) {
Expand Down
2 changes: 1 addition & 1 deletion src/tables/avar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let shortFrac = new r.Fixed(16, 'BE', 14);

Expand Down
2 changes: 1 addition & 1 deletion src/tables/bsln.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import { LookupTable } from './aat';

let BslnSubtable = new r.VersionedStruct('format', {
Expand Down
2 changes: 1 addition & 1 deletion src/tables/cmap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let SubHeader = new r.Struct({
firstCode: r.uint16,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/cvt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// An array of predefined values accessible by instructions
export default new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/tables/directory.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import Tables from './';

let TableEntry = new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/tables/feat.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let Setting = new r.Struct({
setting: r.uint16,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/fpgm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// A list of instructions that are executed once when a font is first used.
// These instructions are known as the font program. The main use of this table
Expand Down
2 changes: 1 addition & 1 deletion src/tables/fvar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let Axis = new r.Struct({
axisTag: new r.String(4),
Expand Down
2 changes: 1 addition & 1 deletion src/tables/gasp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let GaspRange = new r.Struct({
rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem
Expand Down
2 changes: 1 addition & 1 deletion src/tables/glyf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// only used for encoding
export default new r.Array(new r.Buffer);
2 changes: 1 addition & 1 deletion src/tables/gvar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let shortFrac = new r.Fixed(16, 'BE', 14);
class Offset {
Expand Down
2 changes: 1 addition & 1 deletion src/tables/hdmx.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let DeviceRecord = new r.Struct({
pixelSize: r.uint8,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/head.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// font header
export default new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/tables/hhea.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

// horizontal header
export default new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/tables/hmtx.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let HmtxEntry = new r.Struct({
advance: r.uint16,
Expand Down
2 changes: 1 addition & 1 deletion src/tables/just.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';
import { LookupTable, StateTable1 } from './aat';

let ClassTable = new r.Struct({
Expand Down
2 changes: 1 addition & 1 deletion src/tables/kern.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import r from 'restructure';
import r from '@pdf-lib/restructure';

let KernPair = new r.Struct({
left: r.uint16,
Expand Down
Loading

0 comments on commit cc4b9b3

Please sign in to comment.