
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@pixi/text-html
Advanced tools
An alternative to PIXI.Text
that works with PixiJS v5 (both WebGL and Canvas), however, it has some advantages:
<strong>
, or <em>
, as well as <span style="">
Disadvantages:
PIXI.Text
, HTMLText rendering will vary slightly between platforms and browsers. HTMLText uses SVG/DOM to render text and not Context2D's fillText like PIXI.Text
.PIXI.Text
(that is to say, slow and heavy)btoa
and <foreignObject>
, i.e., no Internet Explorer supportnpm install @pixi/text-html
yarn add @pixi/text-html
import { HTMLText } from '@pixi/text-html';
import { TextStyle } from '@pixi/text';
// Can use the TextStyle class found in @pixi/text
const style = new TextStyle({ fontSize: 20 });
// Make a new HTMLText object
const text = new HTMLText("Hello World", style);
Not all styles and values are compatible between PIXI.Text, mainly because Text is rendered using a DOM element instead of Context2D's fillText API.
Supported
fill
fontFamily
fontSize
fontWeight
fontStyle
fontVariant
letterSpacing
†align
(also supports "justify")padding
breakWords
lineHeight
†wordWrap
wordWrapWidth
strokeThickness
‡dropShadow
‡dropShadowAngle
dropShadowDistance
dropShadowBlur
‡dropShadowColor
trim
stroke
strokeThickness
† Values may differ slightly from PIXI.Text rendering. ‡ Appearance may differ slightly between different browsers.
Unsupported
fillGradientStops
fillGradientType
miterLimit
textBaseline
whiteSpace
FAQs
Multi-Style Text Rendering Plugin for PixiJS
The npm package @pixi/text-html receives a total of 46,448 weekly downloads. As such, @pixi/text-html popularity was classified as popular.
We found that @pixi/text-html demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.