Skip to content

Implement casting between IronPdf.Font.FontTypes and Font#68

Merged
mee-ironsoftware merged 5 commits intomasterfrom
IRON-1284-iron-drawing-support-casting-between-iron-software-drawing-fonts-and-iron-pdf-font-font-types
Jul 31, 2023
Merged

Implement casting between IronPdf.Font.FontTypes and Font#68
mee-ironsoftware merged 5 commits intomasterfrom
IRON-1284-iron-drawing-support-casting-between-iron-software-drawing-fonts-and-iron-pdf-font-font-types

Conversation

@mee-ironsoftware
Copy link
Copy Markdown
Member

@mee-ironsoftware mee-ironsoftware commented Jul 25, 2023

Description

  1. Move IronPdf.Font.FontTypes into IronDrawing
  2. Implement casting between FontTypes and Font

Casting FontTypes to Font

IronSoftware.Drawing.Font font = IronPdf.Font.FontTypes.TimesNewRomanBoldItalic;

Casting FontTypes from Font

var font = new IronSoftware.Drawing.Font("Courier New", FontStyle.Bold);
IronPdf.Font.FontTypes fontTypes = font;

Fixes IRON-1284

Type of change

Please select the relevant option by placing an 'x' inside the brackets, like this: [x].

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🏗️ Internal/structural update (non-breaking change that improves code quality, organization, or performance)
  • 📚 This change requires a documentation update
  • 🚀 DevOps build chain modification for release
  • 🤖 DevOps build chain modification for CI

How Has This Been Tested?

Add 3 unit tests

  1. Casting FontTypes to Font
  2. Casting Font to FontTypes
  3. Casting Font to FontTypes should throw exception if font not supported in FontTypes

Checklist:

Please run through the checklist as much as possible and mark the items completed by placing an 'x' inside the brackets, like this: [x].

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have successfully run all unit tests on Windows
  • I have successfully run all unit tests on Linux

@mee-ironsoftware mee-ironsoftware marked this pull request as ready for review July 26, 2023 03:12
Copy link
Copy Markdown
Contributor

@artem-iron artem-iron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

Copy link
Copy Markdown
Contributor

@artem-iron artem-iron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀🚀🚀

@mee-ironsoftware mee-ironsoftware merged commit 9a079de into master Jul 31, 2023
@mbkrispy mbkrispy deleted the IRON-1284-iron-drawing-support-casting-between-iron-software-drawing-fonts-and-iron-pdf-font-font-types branch October 13, 2023 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants