Class: Fontist::InstallLocations::FontistLocation

Inherits:
BaseLocation
  • Object
show all
Defined in:
lib/fontist/install_locations/fontist_location.rb

Overview

Fontist library location (default installation location)

This location represents the fontist-managed font library at:

~/.fontist/fonts/{formula-key}/

Characteristics:

  • Always managed (safe to replace fonts)

  • Formula-keyed for isolation

  • No elevated permissions required

  • Default installation location

Example paths:

~/.fontist/fonts/roboto/Roboto-Regular.ttf
~/.fontist/fonts/macos/font7/sf_pro/SFPro-Regular.ttf

Instance Attribute Summary

Attributes inherited from BaseLocation

#formula

Instance Method Summary collapse

Methods inherited from BaseLocation

#find_fonts, #font_exists?, #font_path, #initialize, #install_font, #permission_warning, #requires_elevated_permissions?, #uninstall_font

Constructor Details

This class inherits a constructor from Fontist::InstallLocations::BaseLocation

Instance Method Details

#base_pathPathname

Returns base installation path for this formula

Structure: ~/.fontist/fonts/formula-key/ The formula key provides isolation between different font formulas

Returns:

  • (Pathname)

    Formula-keyed installation directory



30
31
32
# File 'lib/fontist/install_locations/fontist_location.rb', line 30

def base_path
  Fontist.fonts_path.join(formula.key)
end

#location_typeSymbol

Returns location type identifier

Returns:

  • (Symbol)

    :fontist



20
21
22
# File 'lib/fontist/install_locations/fontist_location.rb', line 20

def location_type
  :fontist
end