Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
ngx-font-picker-filtered-filtered
Advanced tools
This is a simple font picker loosely based on the cool angular2-color-picker by Alberplz.
This documentation is for the latest 5/6.x.x version which requires Angular 5 or newer. For Angular 4 you need to use the latest 4.x.x version. Documentation for the 4.x.x can be found from here.
Example application | StackBlitz example
npm install
npm run build
npm install
npm run start
npm install ngx-font-picker --save
Global configuration should be provided only once (this is usually done in the root module).
import { FontPickerModule } from 'ngx-font-picker';
import { FONT_PICKER_CONFIG } from 'ngx-font-picker';
import { FontPickerConfigInterface } from 'ngx-font-picker';
const DEFAULT_FONT_PICKER_CONFIG: FontPickerConfigInterface = {
// Change this to your Google API key
apiKey: 'AIzaSyA9S7DY0khhn9JYcfyRWb1F6Rd2rwtF_mA'
};
@NgModule({
...
imports: [
...
FontPickerModule
],
providers: [
{
provide: FONT_PICKER_CONFIG,
useValue: DEFAULT_FONT_PICKER_CONFIG
}
]
})
<div #fontPickerElement=ngxFontPicker [(fontPicker)]="font" [fpWidth]="'320px'" [fpPosition]="'bottom'">
Click to open the font picker
</div>
[(fontPicker)] // Selected font ({family, size, style, styles, files}).
[fpWidth] // Width of the font picker (Default: '280px').
[fpHeight] // Height of the font picker (Default: '320px').
[fpPosition] // Position of the font picker (Default: 'bottom').
[fpAutoLoad] // Auto loads font on change (fontPicker input change).
[fpSearchText] // Search hint text (Default: 'Search fonts...').
[fpLoadingText] // Fonts loading text (Default: 'Loading fonts...').
[fpPopularLabel] // Popular fonts label (Default: 'Popular fonts').
[fpResultsLabel] // Search results label (Default: 'Search results').
[fpSizeSelect] // Show size selector in the font picker (Default: false).
[fpStyleSelect] // Show style selector in the font picker (Default: false).
[fpPresetLabel] // Label for the preset fonts list (Default: undefined).
[fpPresetFonts] // Listing of preset fonts to show (Default: undefined).
[fpPresetNotice] // Notice to show for custom fonts (Default: undefined).
[fpFallbackFont] // Fallback font (Default: {family: 'Roboto', size: 14}).
[fpCancelButton] // Show cancel button in the font picker (Default: false).
[fpCancelButtonText] // Text label for the cancel button (Default: 'Cancel').
[fpCancelButtonClass] // Class name for the cancel button (Replaces default).
[fpUploadButton] // Show upload button in the font picker (Default: false).
[fbUploadButtonText] // Text label for the upload button (Default: 'Upload').
[fpUploadButtonClass] // Class name for the upload button (Replaces default).
[fpDialogDisplay] // Dialog positioning mode: 'popup', 'inline' ('popup').
// popup: dialog is shown as popup (fixed positioning).
// inline: dialog is shown permanently (static positioning).
[fpUseRootViewContainer] // Create dialog component in the root view container (false).
// Note: The root component needs to have public viewContainerRef.
(fontPickerChange) // Event handler for the font / size / style change.
(fontPickerUpload) // Event handler for the font upload button click event.
apiKey // Your Google API key for the Google Web Fonts API.
loadFont(font) // Loads the given font (family:style) from Web Fonts.
getAllFonts(sort) // Returns list of Google Fonts with given sort option:
// 'alpha' | 'date' | 'popularity' | 'style' | 'trending'
loadFont(font) // Loads the (font.family:font.style) form Web Fonts.
openDialog() // Opens the font picker dialog if not already open.
closeDialog() // Closes the font picker dialog if not already closed.
toggleDialog() // Toggles the open state of the font picker dialog.
@ViewChild('fontPickerElement', {static: true})
fontPicker: FontPickerDirective;
closeFontPicker(field: string): void {
this.fontPicker.closeDialog();
}
FAQs
Google fonts font picker widget for Angular
The npm package ngx-font-picker-filtered-filtered receives a total of 1 weekly downloads. As such, ngx-font-picker-filtered-filtered popularity was classified as not popular.
We found that ngx-font-picker-filtered-filtered demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.