public FontEmbedOption(ProjectFont projectFont, IProjectItem projectItem, SceneViewModel viewModel, FontEmbeddingDialogModel embeddingModel) { this.projectFont = projectFont; this.viewModel = viewModel; this.InitializeEmbedOptions(projectItem); this.isEmbedded = this.IsFontItemEmbedded; this.embeddingModel = embeddingModel; this.IsFontSubsettingAllowed = FontEmbedder.DoesFontFileSupportSubsetting(projectFont.FontDocumentPath); }
public void EmbedProjectFont(ProjectFont projectFont) { foreach (DocumentReference documentReference in projectFont.FontDocuments) { IProjectItem projectItem = this.viewModel.DesignerContext.ActiveProject.FindItem(documentReference); IMSBuildItem msBuildItem = projectItem as IMSBuildItem; if (projectItem != null && msBuildItem != null) { projectItem.Properties["BuildAction"] = "BlendEmbeddedFont"; if (string.IsNullOrEmpty(msBuildItem.GetMetadata("All"))) { msBuildItem.SetMetadata("All", "True"); msBuildItem.SetMetadata("AutoFill", "True"); } } } this.ChangeFontReferenceToZippedFont((IProjectFont)projectFont); this.EnsureFontSubsettingTask(); }
public ProjectFontFamilyItem(ProjectFont projectFont, SceneNodeObjectSet sceneNodeObjectSet) : base(projectFont.FontFamily, "Project Font", sceneNodeObjectSet) { this.projectFont = projectFont; }
public ProjectFontFamilyItem(ProjectFont projectFont, IDocumentContext documentContext) : base(projectFont.FontFamily, "Project Font", documentContext) { this.projectFont = projectFont; }